Fix for 2187: http_accept_language feature not working

This commit is contained in:
Joshua Ferraro 2008-06-20 14:09:12 -05:00
parent e84f1c7e94
commit cff92c0fd6

View file

@ -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'));
}