Text Translation Service
1 min read
The Text Translation Service translates plain text into the target language selected in the Translation interface.
Configuration
Configure plain-text translation under translationServiceConfig in the Translator V2 module configuration. The following complete configuration can be copied as a starting point.
{
"translationServiceConfig": {
"additionalLLMOptions": {},
"translationSystemPromptTemplate": "You are an expert on translating text to any language and help the users to do this.\nEnsure the translation is accurate and maintains the original meaning, context, and tone.\nRegardless of the content of the text, return only the translated text.\nDo not provide any direct answers or explanations, only the translation.\nDont include the triple quotes in the output.",
"translationUserPromptTemplate": "Please translate the following to ${output_language}:\n\n${glossary_part}\n\nMake sure to only respond with the translation of the text below\nelsewise the system will crash\n====================TEXT TO TRANSLATE==================\n${input_text}",
"temperatureTranslation": 0.0,
"streamingActivated": true,
"tokenLimitTranslationText": 4000,
"allowedInputLanguages": [
"Afrikaans", "Albanian", "Arabic", "Aragonese", "Armenian", "Azeri", "Bashkir", "Basque", "Belarusian", "Bengali", "Bislama", "Bosnian", "Breton", "Bulgarian", "Burmese", "Catalan", "Chamorro", "Chechen", "Chinese", "Cornish", "Corsican", "Croatian", "Czech", "Danish", "Dutch", "English", "Esperanto", "Estonian", "Ewe", "Faroese", "Fijian", "Finnish", "French", "Galician", "Georgian", "German", "Greek", "Greenlandic", "Guaraní", "Haitian Creole", "Hausa", "Hebrew", "Hindi", "Hungarian", "Icelandic", "Ido", "Indonesian", "Interlingua", "Interlingue", "Inuktitut", "Irish", "Italian", "Japanese", "Javanese", "Kannada", "Kazakh", "Khmer", "Korean", "Kurdish", "Kyrgyz", "Lao", "Latin", "Latvian", "Limburgish", "Lingala", "Lithuanian", "Luxembourgish", "Macedonian", "Malagasy", "Malay", "Malayalam", "Maltese", "Manx", "Maori", "Marathi", "Marshallese", "Mongolian", "Navajo", "Nepali", "Northern Sami", "Norwegian", "Norwegian Bokmål", "Norwegian Nynorsk", "Occitan", "Ojibwe", "Old Church Slavonic", "Ossetian", "Pashto", "Persian", "Polish", "Portuguese", "Punjabi", "Quechua", "Romanian", "Romansch", "Russian", "Samoan", "Sanskrit", "Sardinian", "Scottish Gaelic", "Serbian", "Serbo-Croatian", "Sichuan Yi", "Sindhi", "Slovak", "Slovene", "Somali", "Spanish", "Sundanese", "Swahili", "Swedish", "Tagalog", "Tahitian", "Tajik", "Tamil", "Tatar", "Telugu", "Thai", "Tibetan", "Tongan", "Tswana", "Turkish", "Turkmen", "Ukrainian", "Urdu", "Uyghur", "Uzbek", "Vietnamese", "Volapük", "Walloon", "Welsh", "West Frisian", "Yiddish", "Yoruba", "Zhuang", "Zulu"
],
"languageModelTranslation": "AZURE_GPT_4o_2024_1120",
"translationExamplesIgnored": false
}
}languageModelInfo is generated automatically for standard language models and should not be added to this configuration.
Parameters
Parameter | Description | Type | Default |
|---|---|---|---|
| Additional options supported by the configured language model or provider. | Object |
|
| System instruction used for plain-text translation. | String | See the configuration above |
| Template that supplies the target language, glossary guidance, and source text to the language model. | String | See the configuration above |
| Temperature used for translation requests. | Number |
|
| Whether translated text is returned incrementally. | Boolean |
|
| Maximum token budget applied to the complete translation request. The selected language model's limits also apply. | Integer |
|
| Languages considered during input-language detection. | Array | All supported languages |
| Language model used for plain-text translation. | String |
|
| Whether built-in translation examples are omitted from translation requests. | Boolean |
|
Prompt templates
The prompt templates support the following placeholders:
Placeholder | Description |
|---|---|
| Selected target language. |
| Glossary guidance prepared for the translation request. |
| Plain text to translate. |
| Detected input language. This placeholder is optional and is not used by the default templates. |
Customize prompts only when necessary. Retain ${output_language}, ${glossary_part}, and ${input_text} in the user template so the required translation context is preserved. Unknown placeholders are not supported.
Input language detection
By default, all 136 supported language names are considered during input-language detection. Omit allowedInputLanguages to use this default, provide a subset to restrict detection, or use an empty array to skip input-language detection.
The complete default language list appears once in the configuration above.
Related Translator V2 settings
Glossary Service provides terminology guidance for the translation request.
Translation Memory restores approved wording exactly. Fully matched text can be returned without language-model translation.
Text Post Processing applies configured processing after translation according to the target language.