mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 15:54:03 +02:00
parent
e2887df03e
commit
6e61980dd2
@ -314,12 +314,12 @@ class Web extends ApplicationBootstrap
|
|||||||
protected function detectLocale()
|
protected function detectLocale()
|
||||||
{
|
{
|
||||||
$auth = Manager::getInstance();
|
$auth = Manager::getInstance();
|
||||||
if (! $auth->isAuthenticated()
|
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && !$auth->isAuthenticated()
|
||||||
|| ($locale = $auth->getUser()->getPreferences()->getValue('icingaweb', 'language')) === null
|
|| ($locale = $auth->getUser()->getPreferences()->getValue('icingaweb', 'language')) === null
|
||||||
&& isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])
|
|
||||||
) {
|
) {
|
||||||
$locale = Translator::getPreferredLocaleCode($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
$locale = Translator::getPreferredLocaleCode($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $locale;
|
return $locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user