translate_elements

mutationSince v1.0

Write translations into the model. Each call merges with what's already there rather than replacing it, so you can work through a large model in batches without losing earlier work.

The language has to be enabled on the model first — use enable_language, or turn it on in the model's language settings. Translating into a language that isn't enabled returns an error telling you which languages are available.

Get your keys from list_translatable_strings rather than constructing them by hand. A key names one piece of text on one element, in the form element-id followed by the field — for example a label, a description, or a particular property value.

One rule for document bodies: rendering documents and publication homepages are prose mixed with instructions that pull in live model data. Translate the prose and leave every directive, query block and interpolation exactly as it is — changing one stops the page rendering.

Parameters

NameTypeRequiredDefaultDescription
languageStringCode of the language you are translating into (for example 'de'). It must already be enabled on the model.
translationsObjectThe translations to write, as a set of key-and-text pairs. Each key names one piece of text on one element; take the keys from list_translatable_strings rather than building them yourself.

Example Request

{"language": "de", "translations": {"9f0c...:label": "OAuth-Integration", "9f0c...:description": "OAuth 2.0-Unterstützung ergänzen"}}

Example Response

{"success": true, "operation_count": 1, "versions": [91]}

This content was written collaboratively with AI.