Translate

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.

Source fileen.json
{
  "nav": { "greeting": "Welcome back, {{name}}!" },
  "inbox_one": "{{count}} new message",
  "inbox_other": "{{count}} new messages"
}

What to watch for in JSON translations

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.

Beforeen.json
{
  "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}}"
  }
}
Afterde.json
{
  "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}}"
  }
}
Free check on this file/check
error ph.nesting: lost placeholder $t(nav.cart)

What KAERIS does with it

Run it in three steps

  1. Install the CLI

    Run pip install kaeris. No account is needed for the free limits.

  2. Translate the file

    Run kaeris translate en.json --langs de,ja --verify. The files de.json and ja.json appear next to the source.

  3. 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