Class TranslatedTextItem

java.lang.Object
com.azure.ai.translation.text.models.TranslatedTextItem

public final class TranslatedTextItem extends Object
Element containing the translated text.
  • Method Details

    • getDetectedLanguage

      public DetectedLanguage 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

      public List<Translation> 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

      public SourceText 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.