Sha256: 76ff0256b36356506e6988fee9284cb5d4a2198784b09d7c853c040db2cdbede
Contents?: true
Size: 497 Bytes
Versions: 18
Compression:
Stored size: 497 Bytes
Contents
# frozen_string_literal: true module Maglev module ContentLocaleConcern extend ActiveSupport::Concern included do helper_method :content_locale end private def set_content_locale locale = params[:locale] || request.headers['X-MAGLEV-LOCALE'] Maglev::I18n.current_locale = locale if locale end def content_locale Maglev::I18n.current_locale end def default_content_locale maglev_site.default_locale.prefix end end end
Version data entries
18 entries across 18 versions & 1 rubygems