module Locomotive::Steam::Liquid::Filters::Translate

Public Instance Methods

t(input, options = nil, legacy_scope = nil)
Alias for: translate
translate(input, options = nil, legacy_scope = nil) click to toggle source
# File lib/locomotive/steam/liquid/filters/translate.rb, line 8
def translate(input, options = nil, legacy_scope = nil)
  options ||= {}

  unless options.respond_to?(:values) # String
    options = { 'locale' => options, 'scope' => legacy_scope }
  end

  @context.registers[:services].translator.translate(input, options) || input
end
Also aliased as: t