From ad60e3c75357e5fcec1a5456f353a006a24fecae Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 23 Jan 2022 20:21:11 +0100 Subject: [PATCH] Disable locale switching logic --- app/controllers/application_controller.rb | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 78d9ee01..b59a85dc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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