Translate Key
translate_keyAdd or update a source translation key and generate translations for target locales. Optionally overwrite existing translations to fix stale entries.
Instructions
Add/update one source translation key and translate it into target locales. Unlike translate_missing, this can overwrite existing stale target translations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | Yes | Layer name from discover to update (e.g., "root", "app-admin"). | |
| key | Yes | Dot-separated key path to translate. Example: "bookingCreator.options.removeSubResource". | |
| sourceLocale | Yes | Source locale ref. May be code ("en-us"), language ("en-US"), or file ("en-US.json"). | |
| sourceValue | No | Optional source value. If provided, source locale is added/updated before translating. If omitted, existing source value is read. | |
| targetLocales | No | Target locales to translate into. Use "all" or omit for all locales except source. | |
| overwrite | No | When true, overwrite existing target translations. When false, only fill missing targets. Default: true. | |
| dryRun | No | When true, previews source/target locales without writing files or calling sampling. | |
| includePreview | No | When true, include translated values in output. Default false to keep responses compact. | |
| projectDir | No | Absolute path to the Nuxt project root. Defaults to server cwd. |