Class: Translatomatic::Provider::Frengly
- Defined in:
- lib/translatomatic/provider/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 provider instance.
-
#languages ⇒ Array<String>
A list of languages supported by this provider.
Methods inherited from Base
#name, supports_alternative_translations?, supports_no_translate_html?, #to_s, #translate
Constructor Details
#initialize(options = {}) ⇒ Frengly
Create a new Frengly provider instance
16 17 18 19 20 21 22 23 |
# File 'lib/translatomatic/provider/frengly.rb', line 16 def initialize( = {}) super() @key = [:frengly_api_key] || ENV['FRENGLY_API_KEY'] # optional @email = [:frengly_email] @password = [:frengly_password] raise t('provider.email_required') unless @email raise t('provider.password_required') unless @password end |
Instance Method Details
#languages ⇒ Array<String>
26 27 28 |
# File 'lib/translatomatic/provider/frengly.rb', line 26 def languages %w[en fr de es pt it nl tl fi el iw pl ru sv] end |