websvn |
Subversion Repositories: |
Rev 1 | Rev 3 | |
---|---|---|
Line 281... | Line 281... | |
// }}} |
// }}} | |
|
| |
// {{{ getUserLanguage |
// {{{ getUserLanguage | |
|
| |
function getUserLanguage($languages, $default, $userchoice) { |
function getUserLanguage($languages, $default, $userchoice) { | |
global $config; | ||
if (!$config->useAcceptedLanguages()) return $default; | ||
| ||
$acceptlangs = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : false; |
$acceptlangs = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : false; | |
if (!$acceptlangs) return $default; |
if (!$acceptlangs) return $default; | |
|
| |
$langs = array(); |
$langs = array(); | |
$sublangs = array(); |
$sublangs = array(); |