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
-
.localize_on_locale(locale, message, *args) ⇒ String|R18n::Untranslated
Localize a message in a specified locale.
Instance Method Summary collapse
-
#initialize(locale) ⇒ Localizer
constructor
Initialize a new localizer.
Constructor Details
#initialize(locale) ⇒ Localizer
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
.localize_on_locale(locale, message, *args) ⇒ String|R18n::Untranslated
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 |