Module: Yandex::Translator::Langs

Included in:
Yandex::Translator
Defined in:
lib/yandex/translator/langs.rb

Overview

Available languages module

Instance Method Summary collapse

Instance Method Details

#langsObject

Get list of available languages for translation



6
7
8
9
10
11
# File 'lib/yandex/translator/langs.rb', line 6

def langs
  response = request('/getLangs')
  response.parsed_response
rescue YandexFailure => ex
  return { error: ex.message }
end