Translate the site
translateShow the site in other languages at //... Add a language, read a page, item or region's words, then save a translation of each (batch: many in one call). Structure is shared across languages, and a page or item with no translation stays at its original address. Translations are part of the draft and go live on publish. Add a language-switcher block to the header so visitors can change language.
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": {
"site_id": "<site_id>",
"action": "<action>"
},
"name": "translate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | A collection item. read: leave out slug to read every item of the collection. | |
| batch | No | read or save several at once instead of page_slug / item / region: [{ page_slug | item | region, with title, description, texts or fields to save }]. Each is answered on its own; one that fails does not stop the rest. | |
| texts | No | save, page or region: { node_id: { prop: translated text } }, using the node_id and prop that read returned. A word left out keeps what it has; an empty string removes its translation. | |
| title | No | save, page: the translated title. | |
| action | Yes | status: the site's languages, what is still untranslated, and what is stale (its original changed since it was translated, so the original shows until it is translated again). add_language / remove_language: declare or drop one (removing deletes nothing a visitor sees until published; its words are kept unless the language is added back). read: the original words of one page, item or region, with any translation so far. save: store a translation. | |
| fields | No | save, item: { field: translated value }. Same shape as the field itself; a field left out keeps what it has; an empty string removes its translation. | |
| locale | No | Language code such as 'fr' or 'pt-br'. Its pages live at /fr/..., /pt-br/... Required except for status. | |
| region | No | Words outside a page: 'header', 'footer', 'pageLayout', or 'collection:<content_type>' for the words of an item-page layout. | |
| site_id | Yes | ||
| page_slug | No | A page, e.g. '/' or '/about'. | |
| description | No | save, page: the translated search description. |