Module: Lazier::I18n
- Included in:
- Settings
- Defined in:
- lib/lazier/i18n.rb
Overview
Provides an easy way to localized messages in a class.
Instance Method Summary (collapse)
-
- (R18N::Translation) i18n
Get the list of available translation for the current locale.
-
- (R18n::Translation) i18n=(locale)
Set the current locale for messages.
-
- (Object) i18n_setup(root, path)
Setup all I18n translations.
Instance Method Details
- (R18N::Translation) i18n
Get the list of available translation for the current locale.
22 23 24 |
# File 'lib/lazier/i18n.rb', line 22 def i18n @i18n ||= i18n_load_locale(nil) end |
- (R18n::Translation) i18n=(locale)
Set the current locale for messages.
30 31 32 |
# File 'lib/lazier/i18n.rb', line 30 def i18n=(locale) @i18n = i18n_load_locale(locale) end |
- (Object) i18n_setup(root, path)
Setup all I18n translations.
14 15 16 17 |
# File 'lib/lazier/i18n.rb', line 14 def i18n_setup(root, path) @i18n_root = root.to_sym @i18n_locales_path = path end |