Class: Zmeygo::I18nBackend

Inherits:
Object
  • Object
show all
Defined in:
lib/zmeygo/i18n_backend.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ I18nBackend

Returns a new instance of I18nBackend.



8
9
10
11
12
13
# File 'lib/zmeygo/i18n_backend.rb', line 8

def  initialize(options={})
	@collection = {}
	@options = options
  Zmeygo.configure
	self.client = Zmeygo::Client.new(options)
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



6
7
8
# File 'lib/zmeygo/i18n_backend.rb', line 6

def client
  @client
end

Instance Method Details

#translate(locale, key, options = {}) ⇒ Object



15
16
17
# File 'lib/zmeygo/i18n_backend.rb', line 15

def translate(locale, key, options = {})
	client.translate(nil,locale,key)
end