- STRINGS object in app.js with all UI strings in de/en/pl - tr() function, ldoc() locale-aware date formatting - tpl() auto-translates data-t/data-ph/data-val attributes on clone - app.html.twig: data-t attributes on all template static text, language picker in data menu - locale CHAR(2) column on users table; GET /api/me returns locale; PATCH /api/me accepts locale - setLocale() persists to API + localStorage; applyLocale() reads user.locale → localStorage → navigator.language Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 lines
468 B
PHP
21 lines
468 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace DoctrineMigrations;
|
|
|
|
use Doctrine\DBAL\Schema\Schema;
|
|
use Doctrine\Migrations\AbstractMigration;
|
|
|
|
final class Version20260430100000 extends AbstractMigration
|
|
{
|
|
public function up(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE users ADD COLUMN locale CHAR(2) DEFAULT NULL');
|
|
}
|
|
|
|
public function down(Schema $schema): void
|
|
{
|
|
$this->addSql('ALTER TABLE users DROP COLUMN locale');
|
|
}
|
|
}
|