Class: Translatomatic::Provider::Frengly

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

Overview

Interface to the Frengly translation API

Instance Attribute Summary

Attributes inherited from Base

#listener

Instance Method Summary collapse

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(options = {})
  super(options)
  @key = options[:frengly_api_key] || ENV['FRENGLY_API_KEY'] # optional
  @email = options[:frengly_email]
  @password = options[:frengly_password]
  raise t('provider.email_required') unless @email
  raise t('provider.password_required') unless @password
end

Instance Method Details

#languagesArray<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