You can open Cursor or Claude Code, type "add i18n to this app", and get something that works. For a small app with one page and a dozen strings, that may be all you need.
The trouble starts with a real app: a few hundred strings across dozens of components, a second language next month, and new features every week after that. Here is where a coding agent tends to go wrong, what you can do about it if you stay with an agent, and when a dedicated tool is worth it.
1. It only translates the files it reads
An agent works through a context window. It opens the files it thinks matter, wraps the text it sees, and stops when it decides it's done. What gets missed is predictable:
-
Attributes:
placeholder,alt,title,aria-label. Easy to skip because they're not between tags. - Copy in data: arrays of feature cards, nav items, table column headers, select options defined at the top of a file.
- Strings far from the UI: validation messages, empty states, toast text in a hook.
None of these break the build. They just ship in English, and you find them when a German user sends a screenshot.
2. Keys drift between sessions
Ask twice and you get two naming schemes: header.features in one session, nav.featuresLink in the next. The same sentence on two pages ends up under two keys, translated twice and possibly differently. Rename a key later and every existing translation for it is orphaned.
Keys are a contract between your code and your locale files. They need to be stable and derived the same way every time, which is exactly what a fresh prompt doesn't give you.
3. Every run starts from zero
An agent has no memory of what it translated last week. Ask it to "translate the new strings" and it either re-translates everything (more tokens, a noisy diff, reviewers re-reading text that didn't change) or guesses which strings are new.
What you want is a record: for each key and language, the source text it was translated from. If the source hasn't changed, keep the translation. If it has, translate again. That record is a lockfile, and it's the difference between a $0 re-run and paying for the whole app every time.
4. Sentences get chopped into fragments
This one is subtle:
<p>You have <strong>{count}</strong> tasks due today.</p>
A quick fix wraps the two text pieces separately: t("youHave"), then the bold count, then t("tasksDueToday"). In English it reads fine. In German or Japanese the word order is different, and a translator who sees "You have" and "tasks due today" as separate strings can't fix it.
The right shape is one message with the markup and the variable inside it, in ICU format:
"tasksDue": "You have <strong>{count, plural, one {# task} other {# tasks}}</strong> due today."
5. Plurals and placeholders break quietly
{count} tasks covers English. Polish has more plural forms, Arabic has six, Japanese has one. If the plural isn't written as an ICU plural, translators can't express it.
Placeholders have the opposite problem: a model translating Thanks! We sent a link to {email}. sometimes translates the variable name, drops the braces, or loses the {email} entirely. Nothing fails until that string renders with a blank where the address should be.
6. Your product name gets translated
We saw this ourselves while testing a small sample app called Tasklane. On a run where a machine-translation model handled the strings, French came back with the brand name translated as "pour les enfants" (for the children). Brand names, product terms and words you never want translated need to be fixed before translation, not discovered in review.
7. Nobody remembers to do it next month
The first pass is the visible part. The real work is every pull request after it: new strings, changed copy, a new language. With an agent, someone has to remember to ask, and has to ask the same way every time.
If you stay with an agent: a checklist
You can get much better results by giving the agent rules instead of a one-line request. Something like:
Internationalize this app with next-intl.
- Process one directory at a time and list every file you changed.
- Wrap JSX text AND these attributes: placeholder, alt, title, aria-label.
- Also wrap user-facing strings in arrays/objects (labels, titles, descriptions).
- Keys: <file-or-component>.<camelCaseOfFirstWords>. Reuse an existing key if the
same text already has one; never rename existing keys.
- One ICU message per sentence, with markup and variables inside it.
Use ICU plural syntax for any count.
- Never translate: Tasklane, Babelize, GitHub (keep as written).
- Keep every {placeholder} exactly as in the source.
Then check the result with a script rather than by eye:
- every locale file has the same keys as the source file;
- every
{placeholder}in the source appears in each translation; - no translation is identical to the English source (a sign it was skipped);
- no hardcoded text is left in JSX (a quick AST scan or
eslint-plugin-i18next).
And keep your own record of what's been translated, so the next run only touches new or changed strings.
When a dedicated tool is worth it
That checklist is most of what a localization pipeline does, written as instructions to a model that may or may not follow them. If you'd rather not maintain it, this is the job Babelize does:
- it parses every source file with an AST, so attributes and copy in data are found the same way every time;
- keys are derived consistently and reused on re-runs;
- a lockfile means only new or changed strings are translated, and billed;
- sentences become ICU messages, and every translation is checked for lost placeholders and broken plurals;
- a glossary keeps names like Tasklane as written;
- auto-localize translates each push and keeps one pull request up to date, so nobody has to remember.
It also works inside your agent: the Babelize MCP server gives Cursor, Claude Code and Codex these tools, so the agent calls a deterministic pipeline instead of improvising one.
Whichever way you go, the rule is the same: translations should arrive as a diff you review, never straight into production.
Written with AI assistance; every technical detail was checked against the Babelize engine source.
Originally published on the Babelize blog. Disclosure: Babelize is our product, an AI localization tool for React and Next.js apps: it turns hardcoded strings into a reviewed i18n pull request.
Top comments (0)