Module tdlight.api

Class TdApi.TranslateText

Enclosing class:
TdApi

public static final class TdApi.TranslateText extends TdApi.Function<TdApi.Text>
Translates a text to the given language. Returns a 404 error if the translation can't be performed. Returns Text
  • Field Details

    • text

      public String text
      Text to translate.
    • fromLanguageCode

      public String fromLanguageCode
      A two-letter ISO 639-1 language code of the language from which the message is translated. If empty, the language will be detected automatically.
    • toLanguageCode

      public String toLanguageCode
      A two-letter ISO 639-1 language code of the language to which the message is translated.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      See Also:
  • Constructor Details

    • TranslateText

      public TranslateText()
      Translates a text to the given language. Returns a 404 error if the translation can't be performed. Returns Text
    • TranslateText

      public TranslateText(String text, String fromLanguageCode, String toLanguageCode)
      Translates a text to the given language. Returns a 404 error if the translation can't be performed. Returns Text
      Parameters:
      text - String Text to translate.
      fromLanguageCode - String A two-letter ISO 639-1 language code of the language from which the message is translated. If empty, the language will be detected automatically.
      toLanguageCode - String A two-letter ISO 639-1 language code of the language to which the message is translated.
    • TranslateText

      public TranslateText(DataInput input) throws IOException
      Translates a text to the given language. Returns a 404 error if the translation can't be performed. Returns Text
      Throws:
      IOException
  • Method Details