Class TranslatedTextItem
java.lang.Object
com.azure.ai.translation.text.models.TranslatedTextItem
Element containing the translated text.
-
Method Summary
Modifier and TypeMethodDescriptionGet the detectedLanguage property: The detectedLanguage property is only present in the result object when language auto-detection is requested.Get the sourceText property: Input text in the default script of the source language.Get the translations property: An array of translation results.
-
Method Details
-
getDetectedLanguage
Get the detectedLanguage property: The detectedLanguage property is only present in the result object when language auto-detection is requested.- Returns:
- the detectedLanguage value.
-
getTranslations
Get the translations property: An array of translation results. The size of the array matches the number of target languages specified through the to query parameter.- Returns:
- the translations value.
-
getSourceText
Get the sourceText property: 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.- Returns:
- the sourceText value.
-