module Liquid::Rails::TranslateFilter

Public Instance Methods

t(key, options={})
Alias for: translate
translate(key, options={}) click to toggle source
# File lib/liquid4-rails/filters/translate_filter.rb, line 4
def translate(key, options={})
  options = { 'locale' => ::I18n.locale.to_s }.merge(options)

  @context.registers[:view].translate(key.to_s, options.with_indifferent_access)
end
Also aliased as: t