Class: Translatomatic::Translator::Frengly

Inherits:
Base
  • Object
show all
Defined in:
lib/translatomatic/translator/frengly.rb

Instance Attribute Summary

Attributes inherited from Base

#listener

Instance Method Summary collapse

Methods inherited from Base

#name, #translate

Methods included from Util

#locale, #log, #string

Constructor Details

#initialize(options = {}) ⇒ Frengly

Create a new Frengly translator instance



17
18
19
20
21
22
23
24
# File 'lib/translatomatic/translator/frengly.rb', line 17

def initialize(options = {})
  super(options)
  @key = options[:frengly_api_key] || ENV["FRENGLY_API_KEY"] # optional

  @email = options[:frengly_email]
  @password = options[:frengly_password]
  raise "email address required" unless @email
  raise "password required" unless @password
end

Instance Method Details

#languagesArray<String>

Returns A list of languages supported by this translator.

Returns:

  • (Array<String>)

    A list of languages supported by this translator.



27
28
29
# File 'lib/translatomatic/translator/frengly.rb', line 27

def languages
  ['en','fr','de','es','pt','it','nl','tl','fi','el','iw','pl','ru','sv']
end