Translations
Translations live in app/messages/<lang>.json. They are compiled into plain functions at build time with Paraglide, so six languages cost about 50 bytes in the initial bundle.
Fixing a string
Section titled “Fixing a string”- Find the key in
app/messages/en.json. - Change the value in the language file.
- Run
npm testinapp/. A test checks that every language has every key.
Adding a language
Section titled “Adding a language”- Copy
en.jsonto the new language code. - Add the locale in
app/project.inlang/settings.json. - Translate. Keep placeholders such as
{count}and{name}. - Run
npm run paraglide:compileandnpm test.
Known limits
Section titled “Known limits”Polish has three plural forms, which the message format does not express yet. Affected strings avoid the plural. Room, device and scene names are never translated.
Native-speaker reviews are welcome for French, Italian, Portuguese and Polish. See the translation issues.