Disable locale switching logic

This commit is contained in:
Andreas Nedbal 2022-01-23 20:21:11 +01:00 committed by Andreas Nedbal
parent a8f184a001
commit ad60e3c753
1 changed files with 15 additions and 15 deletions

View File

@ -15,21 +15,21 @@ class ApplicationController < ActionController::Base
I18n.locale = 'en'
if params[:hl].nil?
if current_user.present?
I18n.locale = current_user.locale
elsif not cookies[:lang].nil?
I18n.locale = cookies[:lang]
else
I18n.locale = 'en'
end
else
I18n.locale = params[:hl]
if current_user.present?
current_user.locale = I18n.locale
current_user.save!
end
end
# if params[:hl].nil?
# if current_user.present?
# I18n.locale = current_user.locale
# elsif not cookies[:lang].nil?
# I18n.locale = cookies[:lang]
# else
# I18n.locale = 'en'
# end
# else
# I18n.locale = params[:hl]
# if current_user.present?
# current_user.locale = I18n.locale
# current_user.save!
# end
# end
cookies[:lang] = I18n.locale
end