Class TranslateTextParam

  • All Implemented Interfaces:

    
    public final class TranslateTextParam
    
                        

    Translate text parameters.

    Used to specify the text content to translate and its language settings.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getSourceLanguage() Source language.
      final Unit setSourceLanguage(String sourceLanguage) Source language.
      final String getTargetLanguage() Target language.
      final Unit setTargetLanguage(String targetLanguage) Target language.
      final String getText()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TranslateTextParam

        TranslateTextParam(String text)
        Parameters:
        text - the text content to translate
    • Method Detail

      • getSourceLanguage

         final String getSourceLanguage()

        Source language.

        Defaults to "auto", which auto-detects the source language.

      • setSourceLanguage

         final Unit setSourceLanguage(String sourceLanguage)

        Source language.

        Defaults to "auto", which auto-detects the source language.

      • getTargetLanguage

         final String getTargetLanguage()

        Target language.

        Optional. If not provided, uses the user-level configuration. If no configuration is available, defaults to the original text.

      • setTargetLanguage

         final Unit setTargetLanguage(String targetLanguage)

        Target language.

        Optional. If not provided, uses the user-level configuration. If no configuration is available, defaults to the original text.