mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-14 12:04:05 +01:00
detect users first language
This commit is contained in:
parent
15b95d5992
commit
c80df96eca
@ -266,9 +266,12 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If the lastloginid cookies isn't set, we will default to english.
|
// If the lastloginid cookies isn't set, we will default to the first language,
|
||||||
// Change this if you need.
|
// the users browser accepts.
|
||||||
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = 'en';
|
list($lang) = explode(',',$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
|
||||||
|
$lang = substr($lang,0,2);
|
||||||
|
if(strlen($lang) != 2) $lang="en";
|
||||||
|
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang;
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw']->translation->add_app('login');
|
$GLOBALS['phpgw']->translation->add_app('login');
|
||||||
$GLOBALS['phpgw']->translation->add_app('loginscreen');
|
$GLOBALS['phpgw']->translation->add_app('loginscreen');
|
||||||
|
Loading…
Reference in New Issue
Block a user