Module: Liquid::Rails::TranslateFilter
- Defined in:
- lib/liquid4-rails/filters/translate_filter.rb
Instance Method Summary collapse
- #translate(key, options = {}) ⇒ Object (also: #t)
Instance Method Details
#translate(key, options = {}) ⇒ Object Also known as: t
4 5 6 7 8 |
# File 'lib/liquid4-rails/filters/translate_filter.rb', line 4 def translate(key, ={}) = { 'locale' => ::I18n.locale.to_s }.merge() @context.registers[:view].translate(key.to_s, .with_indifferent_access) end |