Class: Authlogic::I18n::Translator
- Inherits:
-
Object
- Object
- Authlogic::I18n::Translator
- Defined in:
- lib/authlogic/i18n/translator.rb
Overview
The default translator used by authlogic/i18n.rb
Instance Method Summary collapse
-
#translate(key, options = {}) ⇒ Object
If the I18n gem is present, calls
I18n.translate
passing all arguments, else returnsoptions[:default]
.
Instance Method Details
#translate(key, options = {}) ⇒ Object
If the I18n gem is present, calls I18n.translate
passing all arguments, else returns options[:default]
.
9 10 11 12 13 14 15 |
# File 'lib/authlogic/i18n/translator.rb', line 9 def translate(key, = {}) if defined?(::I18n) ::I18n.translate key, ** else [:default] end end |