Class: Bobkit::I18nBridge::I18nHandler
- Inherits:
-
Object
- Object
- Bobkit::I18nBridge::I18nHandler
- Includes:
- LocationOptions, Singleton
- Defined in:
- lib/bobkit/i18n_bridge.rb
Instance Method Summary collapse
-
#initialize ⇒ I18nHandler
constructor
A new instance of I18nHandler.
- #locale(language) ⇒ Object
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
#initialize ⇒ I18nHandler
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 |