Upload a language file
wti_upload_fileUpload a local language file to a WebTranslateIt file and locale, preview lines that could overwrite other users' changes, then confirm to start the background import.
Instructions
Upload a local language file to a file and locale on WebTranslateIt, like wti push does for one file. Called without confirm, it uploads nothing: it downloads WebTranslateIt's current copy and returns the lines that are only there (changes by other people that the upload could overwrite) and the lines that are only in your file. Show them to the user, then call again with the confirm token to upload. The import runs in the background. By default strings missing from the upload are kept (ignore_missing: true).
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": {
"file_id": "<file_id>",
"locale": "<locale>",
"local_path": "<local_path>"
},
"name": "wti_upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | Label applied to every string this upload changes. | |
| merge | No | Merge with the existing translations instead of overwriting them (default false). | |
| locale | Yes | Locale of the uploaded file. Use the source locale to update the master file. | |
| confirm | No | The `confirm` token from this tool's preview. It only works while your file and WebTranslateIt's copy are the ones the preview compared; if either changed, you get a new preview instead of an upload. | |
| file_id | Yes | Master file id from wti_get_project. | |
| local_path | Yes | Path of the local file to upload. | |
| minor_changes | No | Master file only: don't flag the target translations as 'to verify'. | |
| ignore_missing | No | Keep strings that are missing from the uploaded file (default true here; the API's default is false). Set false to mark them obsolete, to sync deletions from a complete master file. |