Traduction
Translates text to a target language using a language model. Automatically detects the source language.
Parameters
| Parameter | Type | Required | Variable | Description |
|---|---|---|---|---|
input | dynamic value | Yes | Yes | Text to translate. Accepts a variable or free text. |
sourceLanguage | text | No | No | Source language (ISO 639-1 code). 'auto' for automatic detection. (Default: "auto") |
targetLanguage | text | Yes | No | Target translation language (ISO 639-1 code, e.g. en, fr, de). |
preserveFormatting | boolean | No | No | Preserve source text formatting (markdown, HTML, line breaks). (Default: true) |
preserveProperNouns | boolean | No | No | Keep proper nouns, brands, and place names untranslated. (Default: false) |
domain | choice (general, technical, legal, medical, business) | No | No | Specialized domain to adapt translation vocabulary. (Default: "general") |
glossary | array | No | No | Custom glossary of terms to preserve during translation (source/target pairs). |
model.provider | text | No | No | Language model provider (e.g. openai, anthropic). |
model.model | text | No | No | Model identifier to use (e.g. gpt-4o). |
parameters.temperature | number | No | No | Model creativity. Low value recommended for translation. (Default: 0.3, min 0, max 2) |
parameters.maxTokens | number | No | No | Maximum number of tokens in the generated translation. (Default: 4096, min 1, max 128000) |
outputVariable | text | No | No | Output variable name containing the translation. |
outputDetectedLanguage | text | No | No | Variable name storing the automatically detected source language. |
Parameters marked Variable = Yes accept the
{{blockName.field}}syntax.
Output
Output variable : translation
{
"content": "...",
"detectedLanguage": "..."
}
Example
Translate text from French to English.
Input :
{"text": "Le fournisseur a confirme la livraison.", "targetLanguage": "en"}
Output :
{"content": "The supplier confirmed the delivery.", "detectedLanguage": "fr"}
Tip
{{translation.content}} contains the translated text. {{translation.detectedLanguage}} indicates the detected source language (ISO 639-1 code).