Module: IceCube::I18n

Defined in:
lib/ice_cube/i18n.rb

Class Method Summary collapse

Class Method Details

.backendObject



11
12
13
# File 'lib/ice_cube/i18n.rb', line 11

def self.backend
  @backend
end

.detect_backend!Object



15
16
17
18
19
20
21
22
# File 'lib/ice_cube/i18n.rb', line 15

def self.detect_backend!
  require 'i18n'
  ::I18n.load_path += Dir[File.expand_path('../../../config/locales/*{rb,yml}', __FILE__)]
  @backend = ::I18n
rescue LoadError
  require 'ice_cube/null_i18n'
  @backend = NullI18n
end

.l(*args) ⇒ Object



7
8
9
# File 'lib/ice_cube/i18n.rb', line 7

def self.l(*args)
  backend.l(*args)
end

.t(*args) ⇒ Object



3
4
5
# File 'lib/ice_cube/i18n.rb', line 3

def self.t(*args)
  backend.t(*args)
end