Skip to content
Snippets Groups Projects
Commit c2c0c103 authored by Francisco de Juan's avatar Francisco de Juan
Browse files

force english as uniq locale

parent dddda143
No related merge requests found
......@@ -127,18 +127,7 @@ class ApplicationController < ActionController::Base
end
def set_localization
lang = nil
if User.current.logged?
lang = find_language(User.current.language)
end
if lang.nil? && request.env['HTTP_ACCEPT_LANGUAGE']
accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first
if !accept_lang.blank?
accept_lang = accept_lang.downcase
lang = find_language(accept_lang) || find_language(accept_lang.split('-').first)
end
end
lang ||= Setting.default_language
lang = Setting.default_language
set_language_if_valid(lang)
end
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment