summaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-24 10:28:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-01-24 10:28:12 +0000
commite391be40866f720ddc47398bb51e63e551935de3 (patch)
treed0bf0d5efd8e020e0bf9b03a2e07f3bbc0a2eb25 /app/controllers/application_controller.rb
parent6e6c6fac5caf92103a54e0c8f76a06f5f1b3b4f4 (diff)
downloadredmine-e391be40866f720ddc47398bb51e63e551935de3.tar.gz
redmine-e391be40866f720ddc47398bb51e63e551935de3.zip
Adds settings for disabling browser language detection and language preference (#2691).
git-svn-id: http://svn.redmine.org/redmine/trunk@12691 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 228be479e..152dc3f18 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -201,7 +201,7 @@ class ApplicationController < ActionController::Base
if User.current.logged?
lang = find_language(User.current.language)
end
- if lang.nil? && request.env['HTTP_ACCEPT_LANGUAGE']
+ if lang.nil? && !Setting.force_default_language_for_anonymous? && request.env['HTTP_ACCEPT_LANGUAGE']
accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first
if !accept_lang.blank?
accept_lang = accept_lang.downcase