Sha256: ad44b27bf6e73da08cce6d3763a1f10e38a2f5e898eb265090b0da026ccf441c

Contents?: true

Size: 377 Bytes

Versions: 7

Compression:

Stored size: 377 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module Tags
    class LocalizationTag < Liquid::Tag
      include Bridgetown::Filters::LocalizationFilters

      def render(_context)
        input, format, locale = @markup.split.map(&:strip)
        l(input, format, locale)
      end
    end
  end
end

Liquid::Template.register_tag("l", Bridgetown::Tags::LocalizationTag)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bridgetown-core-2.0.0.beta3 lib/bridgetown-core/tags/l.rb
bridgetown-core-2.0.0.beta2 lib/bridgetown-core/tags/l.rb
bridgetown-core-2.0.0.beta1 lib/bridgetown-core/tags/l.rb
bridgetown-core-1.3.4 lib/bridgetown-core/tags/l.rb
bridgetown-core-1.3.3 lib/bridgetown-core/tags/l.rb
bridgetown-core-1.3.2 lib/bridgetown-core/tags/l.rb
bridgetown-core-1.3.1 lib/bridgetown-core/tags/l.rb