TranslatedTextItemOutput interface

Element containing the translated text

Properties

detectedLanguage

The detectedLanguage property is only present in the result object when language auto-detection is requested.

sourceText

Input text in the default script of the source language. sourceText property is present only when the input is expressed in a script that's not the usual script for the language. For example, if the input were Arabic written in Latin script, then sourceText.text would be the same Arabic text converted into Arab script.

translations

An array of translation results. The size of the array matches the number of target languages specified through the to query parameter.

Property Details

detectedLanguage

The detectedLanguage property is only present in the result object when language auto-detection is requested.

detectedLanguage?: DetectedLanguageOutput

Property Value

sourceText

Input text in the default script of the source language. sourceText property is present only when the input is expressed in a script that's not the usual script for the language. For example, if the input were Arabic written in Latin script, then sourceText.text would be the same Arabic text converted into Arab script.

sourceText?: SourceTextOutput

Property Value

translations

An array of translation results. The size of the array matches the number of target languages specified through the to query parameter.

translations: TranslationTextOutput[]

Property Value