Module: ActionView::Helpers::TranslationHelper
- Defined in:
- lib/i18nizer/i18n_override.rb
Instance Method Summary collapse
- #localize(*args) ⇒ Object (also: #l)
- #translate(key, options = {}) ⇒ Object (also: #t)
Instance Method Details
#localize(*args) ⇒ Object Also known as: l
13 14 15 |
# File 'lib/i18nizer/i18n_override.rb', line 13 def localize(*args) I18n.localize *args end |
#translate(key, options = {}) ⇒ Object Also known as: t
4 5 6 7 8 9 10 |
# File 'lib/i18nizer/i18n_override.rb', line 4 def translate(key, = {}) [:raise] = true content_tag('span', I18n.translate(key, ), :class => 'translated_text') rescue I18n::MissingTranslationData => e keys = I18n.send(:normalize_translation_keys, e.locale, e.key, e.[:scope]) content_tag('span', keys.join(', '), :class => 'translation_missing') end |