Class: Sijka::Translator
- Inherits:
-
Object
- Object
- Sijka::Translator
- Defined in:
- lib/sijka/translator.rb
Instance Method Summary collapse
-
#initialize ⇒ Translator
constructor
A new instance of Translator.
- #smoken_with_locale ⇒ Object
Constructor Details
#initialize ⇒ Translator
Returns a new instance of Translator.
5 6 7 8 |
# File 'lib/sijka/translator.rb', line 5 def initialize I18n.load_path = Dir['locales/*.yml'] I18n.enforce_available_locales = false end |
Instance Method Details
#smoken_with_locale ⇒ Object
10 11 12 |
# File 'lib/sijka/translator.rb', line 10 def smoken_with_locale I18n.t 'smoken', locale: I18n.locale, default: I18n.t('smoken', locale: :en) end |