Class: Bobkit::I18nBridge::I18nHandler

Inherits:
Object
  • Object
show all
Includes:
LocationOptions, Singleton
Defined in:
lib/bobkit/i18n_bridge.rb

Instance Method Summary collapse

Methods included from LocationOptions

#assets_folder, #assets_output_folder, #coffee_folder, #css_output_folder, #js_output_folder, #layouts_folder, #locales_folder, #markdown_folder, #output_folder, #root_folder, #styles_folder, #templates_folder

Methods included from OptionsBase

#options, #setopt, #use_defaults

Constructor Details

#initializeI18nHandler

Returns a new instance of I18nHandler.



14
15
16
17
# File 'lib/bobkit/i18n_bridge.rb', line 14

def initialize
  I18n.load_path = Dir["#{locales_folder}/**/*.yml"]
  I18n.backend.load_translations
end

Instance Method Details

#locale(language) ⇒ Object



19
20
21
# File 'lib/bobkit/i18n_bridge.rb', line 19

def locale(language)
  I18n.locale = language
end