app/controllers/concerns/alchemy/admin/current_language.rb in alchemy_cms-7.1.3 vs app/controllers/concerns/alchemy/admin/current_language.rb in alchemy_cms-7.1.4
- old
+ new
@@ -10,10 +10,14 @@
end
private
def load_current_language
- @current_language = Alchemy::Language.current
+ @current_language = if session[:alchemy_language_id].present?
+ set_alchemy_language(session[:alchemy_language_id])
+ else
+ Alchemy::Language.current
+ end
if @current_language.nil?
flash[:warning] = Alchemy.t("Please create a language first.")
redirect_to admin_languages_path
end
end