lib/tdlib/client_methods.rb
# Translates a text to the given language.
# Returns a 404 error if the translation can't be performed.
#
# @param text [TD::Types::String] Text to translate.
# @param from_language_code [TD::Types::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.
# @param to_language_code [TD::Types::String] A two-letter ISO 639-1 language code of the language to which the
#   message is translated.
# @return [TD::Types::Text]
Translates a text to the given language.
Returns a 404 error if the translation can't be performed.
Translates a text to the given language . Returns a 404 error if the translation can ' t be performed .
def translate_text(text:, from_language_code:, to_language_code:)
    broadcast('@type'              => 'translateText',
              'text'               => text,
              'from_language_code' => from_language_code,
              'to_language_code'   => to_language_code)
  end
def translate_text ( text : , from_language_code : , to_language_code : ) broadcast ( '@type' => 'translateText' , 'text' => text , 'from_language_code' => from_language_code , 'to_language_code' => to_language_code ) end
Translates a text to the given language.
Translates a text to the given language .
None
TD::Types::Text
text
Text to translate.
Text to translate .
from_language_code
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.
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 .
to_language_code
A two-letter ISO 639-1 language code of the language to which the message is translated.
A two - letter ISO 639 - 1 language code of the language to which the message is translated .