Sha256: 8eef7672bac7e021d84e5e9561faa11394684f4c6550d1ff93b3f5441f98478b
Contents?: true
Size: 455 Bytes
Versions: 14
Compression:
Stored size: 455 Bytes
Contents
Spree::BaseController.class_eval do before_filter :set_locale #, :if => proc { !session[:locale] } protected def set_locale I18n.locale = extract_locale || I18n.default_locale end def extract_locale parsed_locale = (session[:zoned] && session[:zoned][:current_language]) || I18n.default_locale #I18n.available_locales.include?(parsed_locale.to_sym) ? parsed_locale : nil parsed_locale ? parsed_locale.to_sym : nil end end
Version data entries
14 entries across 14 versions & 1 rubygems