Skip to main content

Traduction

Translates text to a target language using a language model. Automatically detects the source language.

Parameters

ParameterTypeRequiredVariableDescription
inputdynamic valueYesYesText to translate. Accepts a variable or free text.
sourceLanguagetextNoNoSource language (ISO 639-1 code). 'auto' for automatic detection. (Default: "auto")
targetLanguagetextYesNoTarget translation language (ISO 639-1 code, e.g. en, fr, de).
preserveFormattingbooleanNoNoPreserve source text formatting (markdown, HTML, line breaks). (Default: true)
preserveProperNounsbooleanNoNoKeep proper nouns, brands, and place names untranslated. (Default: false)
domainchoice (general, technical, legal, medical, business)NoNoSpecialized domain to adapt translation vocabulary. (Default: "general")
glossaryarrayNoNoCustom glossary of terms to preserve during translation (source/target pairs).
model.providertextNoNoLanguage model provider (e.g. openai, anthropic).
model.modeltextNoNoModel identifier to use (e.g. gpt-4o).
parameters.temperaturenumberNoNoModel creativity. Low value recommended for translation. (Default: 0.3, min 0, max 2)
parameters.maxTokensnumberNoNoMaximum number of tokens in the generated translation. (Default: 4096, min 1, max 128000)
outputVariabletextNoNoOutput variable name containing the translation.
outputDetectedLanguagetextNoNoVariable 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).