Class: Translatomatic::Translator::Frengly
- Defined in:
- lib/translatomatic/translator/frengly.rb
Overview
Interface to the Frengly translation API
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Frengly
constructor
Create a new Frengly translator instance.
-
#languages ⇒ Array<String>
A list of languages supported by this translator.
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ Frengly
Create a new Frengly translator instance
22 23 24 25 26 27 28 29 |
# File 'lib/translatomatic/translator/frengly.rb', line 22 def initialize( = {}) super() @key = [:frengly_api_key] || ENV["FRENGLY_API_KEY"] # optional @email = [:frengly_email] @password = [:frengly_password] raise t("translator.email_required") unless @email raise t("translator.password_required") unless @password end |
Instance Method Details
#languages ⇒ Array<String>
32 33 34 |
# File 'lib/translatomatic/translator/frengly.rb', line 32 def languages ['en','fr','de','es','pt','it','nl','tl','fi','el','iw','pl','ru','sv'] end |