Class: Mamertes::Localizer
- Inherits:
-
Lazier::Localizer
- Object
- Lazier::Localizer
- Mamertes::Localizer
- Defined in:
- lib/mamertes/application.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.
41 42 43 |
# File 'lib/mamertes/application.rb', line 41 def initialize(locale) super(:mamertes, ::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.
51 52 53 |
# File 'lib/mamertes/application.rb', line 51 def self.localize_on_locale(locale, , *args) new(locale).i18n.send(, *args) end |