Skip to content
Snippets Groups Projects
Commit 1c0d6edb authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

better log message when there is no HTTP_ACCEPT_LANGUAGE header

parent d5ffcad2
Branches
Tags
No related merge requests found
...@@ -74,8 +74,10 @@ sub new { ...@@ -74,8 +74,10 @@ sub new {
$self->{logger}->debugf("setting language from parameter: %s", $lang); $self->{logger}->debugf("setting language from parameter: %s", $lang);
} elsif ($lang = $cookies->{lang} ? $cookies->{lang}->value() : undef) { } elsif ($lang = $cookies->{lang} ? $cookies->{lang}->value() : undef) {
$self->{logger}->debugf("setting language from cookie: %s", $lang); $self->{logger}->debugf("setting language from cookie: %s", $lang);
} elsif ($lang = $ENV{HTTP_ACCEPT_LANGUAGE}) {
$self->{logger}->debugf("setting language from HTTP_ACCEPT_LANGUAGE header: %s", $lang);
} else { } else {
$self->{logger}->debugf("setting language from HTTP_ACCEPT_LANGUAGE header: %s", $ENV{HTTP_ACCEPT_LANGUAGE}); $self->{logger}->debugf("using default language");
} }
$self->{lh} = AccountManager::L10N->get_handle($lang ? $lang: ()); $self->{lh} = AccountManager::L10N->get_handle($lang ? $lang: ());
if (!$self->{lh}) { if (!$self->{lh}) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment