Translate i18next and JSON locale files
Locale JSON is nested, and its strings carry variables like {{name}}. A tool that sees only text can rename a key, flatten the nesting or translate the variable. KAERIS gives the file back in the same shape, with every variable where it was.
How a locale JSON file is built
One file per language (en.json, de.json), or one per namespace (locales/en/common.json). The keys are the contract with your code, so only the values are translated. i18next writes plural forms as separate keys (inbox_one, inbox_other); next-intl, Vue I18n and FormatJS put them into one ICU string.
{
"nav": { "greeting": "Welcome back, {{name}}!" },
"inbox_one": "{{count}} new message",
"inbox_other": "{{count}} new messages"
}
What to watch for in JSON translations
Variables in three spellings
{{name}}in i18next,{name}in ICU-style libraries,%sor${x}elsewhere. One that goes missing shows up as a blank in the running app, not as an error.Plurals need more forms in some languages
English has two forms. Russian, Polish and Arabic need three to six. With ICU strings the free check flags a missing form for ru, uk, pl, cs, sk, hr, sr, lt, ro, ar, lv, sl and he, and a dropped exact branch such as
=0. With i18next suffix keys, your file needs the extra keys the language has; KAERIS translates the keys it finds.References and markup inside a value
i18next
$t(nav.cart), vue-i18n@:nav.shop,<0>…</0>tags of the Trans component and plain HTML all have to survive. The example below shows a real loss of exactly this kind.Notes to yourself
A key whose path has a segment starting with
_(_comment,_status) is treated as a service key and is not translated by default, in JSON, YAML and ARB.
A real run, before and after
A real run: our 97-string test file, German, 26 October 2026, cut to four keys. The last line shows a loss the check caught in that run.
{
"ph": {
"mustache": "Hi {{firstName}}, your order {{orderId}} has shipped.",
"reactTrans": "By continuing you accept our <0>Terms</0> and <1>Privacy Policy</1>.",
"nesting": "$t(nav.cart) has been updated"
},
"icu": {
"copiesLeft": "{count, plural, =0 {Sold out} one {Only # copy left} other {Only # copies left}}"
}
}
{
"ph": {
"mustache": "Hallo {{firstName}}, Ihre Bestellung {{orderId}} wurde versendet.",
"reactTrans": "Durch die fortgesetzte Nutzung stimmen Sie unseren <0>Nutzungsbedingungen</0> und <1>Datenschutzrichtlinien</1> zu.",
"nesting": "Der Warenkorb wurde aktualisiert"
},
"icu": {
"copiesLeft": "{count, plural, =0 {Ausverkauft} one {Nur noch # Exemplar} other {Nur noch # Exemplare}}"
}
}
error ph.nesting: lost placeholder $t(nav.cart)
What KAERIS does with it
Same file, same shape
Keys, nesting and order stay as in your source file; only the values change. Works with i18next, Vue I18n, next-intl and FormatJS files.
Variables counted without AI
After translation a plain counting check compares every variable and tag with the original. A line that lost one is marked and shown on top.
Each line translated back
With
--verifyevery result is translated back into your language and a second model judges whether the meaning changed. You read what each line now says.Only the new keys
kaeris translate --only-newtranslates new and edited keys;kaeris.locknext to the source remembers the rest. JSON and ARB.
Run it in three steps
Install the CLI
Run
pip install kaeris. No account is needed for the free limits.Translate the file
Run
kaeris translate en.json --langs de,ja --verify. The filesde.jsonandja.jsonappear next to the source.Check the result
Run
kaeris check --source en.json --langs de,ja. It exits with code 1 if a variable, a number or a key is wrong, so CI can stop the merge.
pip install kaeris kaeris init --preset i18next kaeris translate en.json --langs de,ja --verify kaeris check --source en.json --langs de,ja
Questions
Which JSON layouts work?
Flat and nested key-value files, as used by i18next, Vue I18n, next-intl and FormatJS. The top level has to be an object, like {"greeting": "Hello"}. Arrays of strings are translated too.
Does it keep {{count}} and $t(…) references?
Variables and references are compared with the source after translation. A line that lost one is flagged; the example above shows a real run where $t(nav.cart) was dropped and the check caught it.
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 en.json --langs de,ja. 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: YAML · .po · ARB · XLIFF · .strings · .xcstrings · .properties · .resx · CSV · Markdown · Fluent · Android XML
Framework guides: react-i18next · next-intl · vue-i18n · Flutter · iOS · Android