translate_missing
Find keys missing in target locales and translate them. Two modes: in provider mode (server env-configured with I18N_PROVIDER, I18N_MODEL, and an API key) the server calls the LLM provider directly and writes the results; in agent mode (no provider configured) it returns per-locale fallbackContexts — translate those inline and persist via write_translations. Check the discover output for the active mode. Uses project config (glossary, translation prompt, locale notes, examples) if available. Translates all locales concurrently by default — pass all targetLocales at once.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
layer | string | no | Layer name from discover to translate (e.g., "root", "app-admin"). Omit to translate every locale-backed layer in one call — the recommended default for layered projects, which returns a result per layer plus an aggregated summary. |
referenceLocale | string | no | Locale code used as translation source (e.g., "en", "en-US"). Defaults to the project default locale. |
targetLocales | string[] | no | Locale codes to translate into (e.g., "de", "fr", "sv"). Defaults to all locales except the reference. |
keys | string[] | no | Specific dot-path keys to translate (e.g., "auth.login.title", "common.save"). If omitted, translates all missing keys in the layer. |
batchSize | number | no | Max keys per provider request (provider mode only). Default: 50. Lower values reduce per-batch risk but increase round trips. |
dryRun | boolean | no | When true, returns which keys would be translated without calling the LLM or writing files. Default: false. |
compact | boolean | no | When true, returns a compact summary (totalTranslated, totalFailed, byLocale) instead of full per-locale results. Default: false. |
projectDir | string | no | Absolute path to the Nuxt project root. Defaults to I18N_PROJECT_DIR, then server cwd. Example: "/home/user/my-app". |
Behavior Hints
A host reads these to decide whether a call needs your confirmation first.
| Hint | Value |
|---|---|
readOnlyHint | false |
Paired CLI Command
The same operation runs from a terminal as the-i18n-cli translate, whose page documents its flags. Both paths call the same @the-i18n-kit/cli functions, so the result is the same.
Every tool is advertised by the-i18n-mcp and listed on the MCP tools overview.