Localize hardcoded text
localizeExtracts hardcoded UI strings into translation keys, rewrites the code to call the i18n library (setting it up when missing), and translates the new messages into every target language. Follows localize.config.json. Needs a localize.dev API key. Send the files in files; nothing is read from or written to your disk. The answer's files are the ones to create or overwrite, each with its whole new content: write them back unchanged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"files": "<files>"
},
"name": "localize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | Monorepo: the app to work in (e.g. apps/web), relative to the repository root. Default: the root. | |
| dir | No | Source folder to scan, relative to the app (default: localize.config.json, else the framework's own). | |
| files | Yes | The project files this call needs, with paths relative to the project root: the UI files to work on, package.json, localize.config.json when there is one, and the existing locale files (for example locales/en.json and locales/es.json). Leave out node_modules, build output and binary files. | |
| paths | No | Only these files or globs, relative to the source folder (e.g. ["components/Cart.tsx"]). Pass the files you just changed, so a run stays quick. | |
| locales | No | Target languages, e.g. ["es","fr"] (default: localize.config.json). |