module Locomotive::Steam::Liquid::Tags::Concerns::I18nPage

Public Instance Methods

change_page_locale(locale, drop) { || ... } click to toggle source
# File lib/locomotive/steam/liquid/tags/concerns/i18n_page.rb, line 9
def change_page_locale(locale, drop, &block)
  page = drop.send(:_source)

  page.__with_locale__(locale) do
    if page.templatized? && page.content_entry
      page.content_entry.__with_locale__(locale) { yield }
    else
      yield
    end
  end
end