Class: I18nTemplate::Translator::I18n
- Inherits:
-
Object
- Object
- I18nTemplate::Translator::I18n
- Defined in:
- lib/i18n_template/translator/i18n.rb
Overview
Standard i18n translator for i18n_template
Constant Summary collapse
- NO_SEPARATOR =
Special symbol for separator
[0x10308].pack('U*').freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(phrase) ⇒ Object
12 13 14 |
# File 'lib/i18n_template/translator/i18n.rb', line 12 def self.call(phrase) self.new.call(phrase) end |
Instance Method Details
#call(phrase) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/i18n_template/translator/i18n.rb', line 16 def call(phrase) ::I18n.translate(phrase, { :default => "~#{phrase}", :separator => NO_SEPARATOR }) end |