TolkBot for next-intl

Translate your next-intl messages with AI, in pull requests.

Add a key to messages/en.json and merge. TolkBot opens a pull request for every other locale, with ICU placeholders and plurals intact and your glossary applied.

14 days free. Starting takes a card. From $9 a month + VAT after that.

messages/en.jsonyou merged this
"files": "{count, plural, one {# file} other {# files}}"
messages/pl.jsonTolkBot's pull request
"files": "{count, plural, one {# plik} few {# pliki} many {# plików} other {# pliku}}"
English has two plural forms. Polish needs four, and gets them.

What TolkBot does in a next-intl project

Finds your setup

It sees next-intl in package.json, reads i18n/request.ts or routing.ts and the plugin in next.config, and finds the files in messages/. There is no config to write.

Keeps ICU syntax exact

{name}, the plural’s argument, its =0 branches and the # come back as they went in. A translation that drops one is refused and translated again, never written.

Plurals for the target language

Each plural gets the forms its language needs, by the same CLDR rules the browser uses: four for Polish and Russian, one for Japanese, whatever English had.

Respects namespaces

The nested objects useTranslations reads stay nested, in your key order and indent. Messages split into one file per namespace work too.

Translates only what changed

A merge that adds three keys translates three keys. A string TolkBot has translated before comes from translation memory and costs no credits.

Checks it in CI

npx tolkbot validate runs offline and exits 1 on a dropped placeholder or a file that does not parse, with the checks TolkBot runs on its own translations.

Set it up

  1. Connect the repo

    Sign in with GitHub, start the trial and install the GitHub App on the repository.

  2. Create the project

    TolkBot detects next-intl and the pattern, such as messages/{locale}.json. Choose the languages, and keep the translations you already have.

  3. Merge as usual

    Each push that changes en.json updates one pull request per language. Mention @tolkbot on a line to correct it.

Do I have to change my next-intl setup?
No. TolkBot reads messages/ where it is and writes each file in its own indent and key order. Its commits touch only the target languages’ files, so your routing and its list of locales stay yours.
Are my messages in TypeScript files supported?
Yes. A file that exports its messages with export default, export const en or module.exports, with as const or satisfies, is read and written back in its own style. A locale that is not a valid name, like pt-pt, is exported as ptPT.
What does a change cost?
Credits are spent when a model translates a string, in proportion to what that call cost. A string served from translation memory costs nothing, so a repeated string, a reverted change or a new locale file full of known strings is free.

Merge in English. Ship every locale.

14 days free. Starting takes a card. From $9 a month + VAT after that.