Sha256: d7e44d02adf0b18b69b8cfa99299fc5bc21e70a10fb5b2b9997f1a67338135d7

Contents?: true

Size: 362 Bytes

Versions: 14

Compression:

Stored size: 362 Bytes

Contents

module Locomotive
  module Steam
    module Liquid
      module Filters

        module Translate

          def translate(input, locale = nil, scope = nil)
            @context.registers[:services].translator.translate(input, locale, scope) || input
          end

        end

        ::Liquid::Template.register_filter(Translate)

      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.rc9 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.rc8 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.rc6 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.rc4 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.rc3 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.rc2 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.rc1 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.pre.alpha.2 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.pre.alpha.1 lib/locomotive/steam/liquid/filters/translate.rb
locomotivecms_steam-1.0.0.pre.alpha lib/locomotive/steam/liquid/filters/translate.rb