Sha256: db985a11ec0ea6ac23d7f73da4f07cb168b17301ade799b177721aa3461b62d3
Contents?: true
Size: 459 Bytes
Versions: 20
Compression:
Stored size: 459 Bytes
Contents
# frozen_string_literal: true module ShopifyApp module Localization extend ActiveSupport::Concern included do before_action :set_locale end private def set_locale if params[:locale] session[:locale] = params[:locale] else session[:locale] ||= I18n.default_locale end I18n.locale = session[:locale] rescue I18n::InvalidLocale I18n.locale = I18n.default_locale end end end
Version data entries
20 entries across 20 versions & 1 rubygems