Class: Sijka::Translator

Inherits:
Object
  • Object
show all
Defined in:
lib/sijka/translator.rb

Instance Method Summary collapse

Constructor Details

#initializeTranslator

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_localeObject



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