Translations
The Translations API provides endpoints for translating plain text or entity fields into any supported language. These endpoints are typically used to automate or assist with content localization throughout the application.
Translate Text
Translate an array of text strings into a target language.
Definition
POST /api/translations/translate-text
Request Keys
text *
array
-
Array of strings to translate (up to 50 per request).
is_html
boolean
false
If true, the text is treated as HTML and tags are preserved.
Keys with * are required.
Example Request
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/translations/translate-text', [
'headers' => ['Authorization' => "Bearer {accessToken}"],
'json' => [
'target_lang_id' => 'fr-FR',
'text' => [
'Hello world!',
'This is a test.',
'<strong>Bold text</strong>'
],
'is_html' => true
]
]);Example Response
Translate Entities
Translate fields of one or more entities into a target language.
Definition
POST /api/translations/translate-entities
Request Keys
translatables *
array
-
Array of objects describing the entities and fields to translate.
translatables.*.translatable_type *
string
-
The entity type (e.g. infoboardPost).
translatables.*.translatable_id *
integer
-
The ID of the entity to translate.
translatables.*.translatable_fields
array
All fields
Array of field names to translate (if omitted, all translatable fields are used).
Example Request
Example Response
Last updated