module I18n::Backend::Tr8n::Implementation

Public Instance Methods

application() click to toggle source
# File lib/i18n/backend/tr8n.rb, line 42
def application
  ::Tr8n.session.application
end
available_locales() click to toggle source
# File lib/i18n/backend/tr8n.rb, line 46
def available_locales
  application.locales
end
lookup(locale, key, scope = [], options = {}) click to toggle source
Calls superclass method
# File lib/i18n/backend/tr8n.rb, line 50
def lookup(locale, key, scope = [], options = {})
  default_key = super(application.default_locale, key, scope, options)
  default_key ||= key
  application.language(locale.to_s).translate(default_key)
end