Module: I18n::Backend::Tr8n::Implementation
Instance Method Summary collapse
- #application ⇒ Object
- #available_locales ⇒ Object
- #lookup(locale, key, scope = [], options = {}) ⇒ Object
Instance Method Details
#application ⇒ Object
42 43 44 |
# File 'lib/i18n/backend/tr8n.rb', line 42 def application ::Tr8n.session.application end |
#available_locales ⇒ Object
46 47 48 |
# File 'lib/i18n/backend/tr8n.rb', line 46 def available_locales application.locales end |
#lookup(locale, key, scope = [], options = {}) ⇒ Object
50 51 52 53 54 |
# File 'lib/i18n/backend/tr8n.rb', line 50 def lookup(locale, key, scope = [], = {}) default_key = super(application.default_locale, key, scope, ) default_key ||= key application.language(locale.to_s).translate(default_key) end |