Translate Flutter ARB files
An .arb file is JSON with ICU messages and an @key block of metadata next to every string. KAERIS translates the messages, keeps the metadata and checks the ICU syntax afterwards.
How an ARB file is built
Plain JSON. Each message sits next to an @message entry with its description and placeholder types; @@locale names the language. Plurals and selects are ICU strings: {count, plural, =0{…} one{…} other{…}}.
{
"@@locale": "en",
"welcome": "Welcome back, {name}!",
"@welcome": {
"description": "Greeting on the home screen",
"placeholders": { "name": { "type": "String" } }
},
"itemCount": "{count, plural, =0{No items} one{{count} item} other{{count} items}}",
"@itemCount": {
"placeholders": { "count": { "type": "int" } }
}
}
What to watch for in ARB translations
ICU syntax is code
One lost brace or a dropped branch breaks the generated Dart. KAERIS compares the ICU blocks with the source and reports a dropped exact branch such as
=0.Languages with more plural forms
Russian needs
fewandmanybesidesoneandother; the check reports a missing form for the languages where that applies.Metadata is for the template, not the translation
@keyentries (description, placeholder types) are kept in the output;@@localeis rewritten for the target language.Placeholders are named
{name}must keep its name, because the generator ties it to the type in the@block.
A real run: translated to German and checked
A real run, 27 October 2026, nothing edited by hand: kaeris translate app_en.arb --langs de with kaeris 0.2.35, 2.7 seconds, model google/gemini-2.5-flash-lite, the free-tier default. Below, the German file it wrote and what kaeris check says about it.
{
"@@locale": "de",
"welcome": "Willkommen zurück, {name}!",
"itemCount": "{count, plural, =0{Keine Artikel} one{{count} Artikel} other{{count} Artikel}}",
"@welcome": {
"description": "Greeting on the home screen",
"placeholders": {
"name": {
"type": "String"
}
}
},
"@itemCount": {
"placeholders": {
"count": {
"type": "int"
}
}
}
}
$ kaeris check --source app_en.arb --langs de ✓ de: complete & placeholder-safe ✓ all locales complete & placeholder-safe
What KAERIS does with it
Metadata kept, locale rewritten
@keyblocks are carried through;@@localeis set per target language.ICU checked
Lost branches, lost variables and brace damage are found by the same check the website runs.
Only the new keys
--only-newworks for ARB: edited and new keys are translated, the rest is reused. Presets:kaeris init --preset flutter-arb.Terminal check
kaeris checkreads ARB sources directly, with no key.
Run it in three steps
Install the CLI
Run
pip install kaeris.Translate the template
Run
kaeris translate lib/l10n/app_en.arb --langs de,ja.Check the result
Run
kaeris checkwith the source and--pattern 'app_{lang}.arb'; it exits with code 1 on a broken variable or ICU block.
pip install kaeris
kaeris init --preset flutter-arb
kaeris translate lib/l10n/app_en.arb --langs de,ja --verify
kaeris check --source lib/l10n/app_en.arb --langs de,ja --pattern 'app_{lang}.arb'
Questions
Are the @metadata entries kept?
Yes. Descriptions and placeholder types stay next to each message; @@locale is rewritten for the target language.
What if the ICU plural is wrong in a translation?
The check compares ICU blocks with the source and names the problem, for example a dropped =0 branch. In the real run above the plural came back with all three branches and the check had nothing to report.
Is it free?
Yes, without an account: 10,000 characters per file and up to 8 languages per run. A free API key raises the file limit to 50,000 characters. Lifetime is $79 once, on your own OpenRouter key; monthly plans start at $19. Pricing
Can I run it from the terminal or in CI?
Yes. pip install kaeris, then kaeris translate lib/l10n/app_en.arb --langs de,ja. See also Flutter. The GitHub Action runs the same translation in a pull request. CLI docs · GitHub Action
Keep going
CLI reference · Check reference · Translate in the browser · Free check · Convert formats · Pseudo-localization
Other formats: JSON · YAML · .po · XLIFF · .strings · .xcstrings · .properties · .resx · CSV · Markdown · Fluent · Android XML
Framework guides: react-i18next · next-intl · vue-i18n · Flutter · iOS · Android