Fix for 2187: http_accept_language feature not working
This commit is contained in:
parent
e84f1c7e94
commit
cff92c0fd6
1 changed files with 4 additions and 1 deletions
|
@ -132,7 +132,10 @@ sub themelanguage {
|
|||
# Set some defaults for language and theme
|
||||
# First, check the user's preferences
|
||||
my $lang;
|
||||
my $http_accept_language = regex_lang_subtags($ENV{HTTP_ACCEPT_LANGUAGE})->{language};
|
||||
my $http_env = $ENV{HTTP_ACCEPT_LANGUAGE};
|
||||
$http_env =~ m/(\w+-*\w*),/;
|
||||
my $language_preference = $1;
|
||||
my $http_accept_language = regex_lang_subtags($language_preference)->{language};
|
||||
if ($http_accept_language) {
|
||||
$lang = accept_language($http_accept_language,getTranslatedLanguages($interface,'prog'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue