Class: Bovem::Localizer
- Inherits:
-
Lazier::Localizer
- Object
- Lazier::Localizer
- Bovem::Localizer
- Defined in:
- lib/bovem/localizer.rb
Overview
This class is used to localize strings inside classes methods.
Class Method Summary (collapse)
-
+ (String|R18n::Untranslated) localize_on_locale(locale, message, *args)
Localize a message in a specified locale.
Instance Method Summary (collapse)
-
- (Localizer) initialize(locale)
constructor
Initialize a new localizer.
Constructor Details
- (Localizer) initialize(locale)
Initialize a new localizer.
13 14 15 |
# File 'lib/bovem/localizer.rb', line 13 def initialize(locale) super("bovem.application", ::File.absolute_path(::Pathname.new(::File.dirname(__FILE__)).to_s + "/../../locales/"), locale) end |
Class Method Details
+ (String|R18n::Untranslated) localize_on_locale(locale, message, *args)
Localize a message in a specified locale.
23 24 25 |
# File 'lib/bovem/localizer.rb', line 23 def self.localize_on_locale(locale, , *args) new(locale).i18n.send(, *args) end |