Translations
Introduction
The Translations API translates plain text or fields of resources that support the Translations capability. Each request selects one active target language; source languages are detected automatically.
The examples translate German (de-DE) source content into French (fr-FR) and Spanish (es-ES) so that multiple source fields and target languages are represented.
Set is_html for standalone Rich Text values so formatting tags are preserved during translation.
Translate Text
Translate an array of text strings into a target language.
Definition
POST /api/translations/translate-text
Request Keys
text*
string[]
-
Text strings to translate, up to 50 per request.
is_html
boolean
false
Treat every submitted string as HTML and preserve its tags.
Keys with * are required.
Behavior
The translator detects the source language for each string. Content considered visually empty, such as empty HTML, is not sent to the provider and is returned unchanged in its original position.
Example Request
Example Response
Translate Entities
Translate fields of one or more entities into a target language.
Definition
POST /api/translations/translate-entities
Request Keys
translatables*
object[]
-
Resources whose fields should be translated.
translatables.*.translatable_type*
string
-
Resource alias, for example infoboardPost.
translatables.*.translatable_id*
integer
-
Existing resource ID.
translatables.*.translatable_fields
string[]
All translatable fields
Specific translatable field names.
Keys with * are required.
Behavior
The endpoint returns existing target-language translations when they are complete and creates missing translations through the configured provider. Unknown, unsupported, inaccessible, and empty resources or fields are skipped.
Example Request
Example Response
Last updated