Module: RemoteI18nExtension

Defined in:
lib/remote_i18n_extension.rb,
lib/remote_i18n_extension/version.rb,
lib/remote_i18n_extension/backend/remote.rb,
lib/remote_i18n_extension/backend/initializer.rb,
lib/generators/remote_i18n_extension/install_generator.rb

Defined Under Namespace

Modules: Backend Classes: InstallGenerator

Constant Summary collapse

VERSION =
'1.0.9'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.remote_hostObject

Returns the value of attribute remote_host.



8
9
10
# File 'lib/remote_i18n_extension.rb', line 8

def remote_host
  @remote_host
end

Class Method Details

.available_localesObject



26
27
28
# File 'lib/remote_i18n_extension.rb', line 26

def available_locales
  I18n.available_locales
end

.available_locales=(locales_array) ⇒ Object



14
15
16
# File 'lib/remote_i18n_extension.rb', line 14

def available_locales=(locales_array)
  I18n.available_locales = locales_array ? locales_array : [:en]
end

.config {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



10
11
12
# File 'lib/remote_i18n_extension.rb', line 10

def config
  yield self
end

.load_pathObject



34
35
36
# File 'lib/remote_i18n_extension.rb', line 34

def load_path
  I18n.load_path
end

.load_path=(paths_array) ⇒ Object



22
23
24
# File 'lib/remote_i18n_extension.rb', line 22

def load_path=(paths_array)
  I18n.load_path = paths_array
end

.localeObject



30
31
32
# File 'lib/remote_i18n_extension.rb', line 30

def locale
  I18n.locale
end

.locale=(locale) ⇒ Object



18
19
20
# File 'lib/remote_i18n_extension.rb', line 18

def locale=(locale)
  I18n.locale = locale || :en
end

.reload!Object



43
44
45
# File 'lib/remote_i18n_extension.rb', line 43

def reload!
  I18n.reload!
end

.translate(*args) ⇒ Object Also known as: t



38
39
40
# File 'lib/remote_i18n_extension.rb', line 38

def translate(*args)
  I18n.t(*args)
end