Translate files
translate_filesSubmit one or more source files to be translated as a single job. Each file is parsed by its content (JSON — flat, nested, ARB and Chrome/WebExtension messages.json — plus PO, XLIFF 1.2 and 2.0, YAML, @wxt-dev/i18n TOML/JSON5/JSONC catalogs, Android XML, iOS xcstrings, Markdown and HTML), so pass the file as-is. Target languages default to the project's configured target languages; pass a subset to translate only some. Returns { jobId, status }. Translation runs asynchronously. This call returns immediately with a jobId; it does NOT wait for translation to finish. Call get_translation with the jobId and keep calling it until status is "completed" (or a terminal failure), then read the files.
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": {
"project": "<project>",
"files": "<files>"
},
"name": "translate_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Source files to translate | |
| project | Yes | Project id (UUID) or slug | |
| targetLanguages | No | Optional target locales (subset of the project targets); defaults to all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | Pass to get_translation to poll this job | |
| status | Yes |