module IceCube::I18n

Constants

LOCALES_PATH

Public Class Methods

backend() click to toggle source
# File lib/ice_cube/i18n.rb, line 16
def self.backend
  @backend ||= detect_backend!
end
detect_backend!() click to toggle source
# File lib/ice_cube/i18n.rb, line 20
def self.detect_backend!
  ::I18n.load_path += Dir[File.join(LOCALES_PATH, '*.yml')]
  ::I18n
rescue NameError
  NullI18n
end
l(*args) click to toggle source
# File lib/ice_cube/i18n.rb, line 12
def self.l(*args)
  backend.l(*args)
end
t(*args) click to toggle source
# File lib/ice_cube/i18n.rb, line 8
def self.t(*args)
  backend.t(*args)
end