Switch language key
zh_Hans -> zh-cn zh_Hant -> zh-tw
This commit is contained in:
@@ -194,7 +194,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/sessions.inc.php';
|
||||
// Set language
|
||||
if (!isset($_SESSION['mailcow_locale']) && !isset($_COOKIE['mailcow_locale'])) {
|
||||
if ($DETECT_LANGUAGE && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||
$header_lang = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
|
||||
$header_lang = strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
if (array_key_exists($header_lang, $AVAILABLE_LANGUAGES)) {
|
||||
$_SESSION['mailcow_locale'] = $header_lang;
|
||||
}
|
||||
|
@@ -101,8 +101,8 @@ $AVAILABLE_LANGUAGES = array(
|
||||
'sk' => 'Slovenčina (Slovak)',
|
||||
'sv' => 'Svenska (Swedish)',
|
||||
'uk' => 'Українська (Ukrainian)',
|
||||
'zh_Hans' => '简体中文 (Simplified Chinese)',
|
||||
'zh_Hant' => '繁體中文 (Traditional Chinese)',
|
||||
'zh-cn' => '简体中文 (Simplified Chinese)',
|
||||
'zh-tw' => '繁體中文 (Traditional Chinese)',
|
||||
);
|
||||
|
||||
// Change theme (default: lumen)
|
||||
|
Reference in New Issue
Block a user