phpMyAdmin 2.7.0 会自动去除语言列表中非 UTF-8 的版本的语言
file: phpMyAdmin/libraries/database_interface.lib.php
line: 539
要显示所有语言的方式是在上面加粗的地方加两行注释。
line: 539
if (PMA_MYSQL_INT_VERSION >= 40100) {
// If $lang is defined and we are on MySQL >= 4.1.x,
// we auto-switch the lang to its UTF-8 version (if it exists and user didn't force language)
if (!empty($GLOBALS['lang']) && (substr($GLOBALS['lang'], -5) != 'utf-8') && !isset($GLOBALS['cfg']['Lang'])) {
$lang_utf_8_version = substr($GLOBALS['lang'], 0, strpos($GLOBALS['lang'], '-')) . '-utf-8';
if (!empty($GLOBALS['available_languages'][$lang_utf_8_version])) {
$GLOBALS['lang'] = $lang_utf_8_version;
$GLOBALS['charset'] = $charset = 'utf-8';
}
}
// and we remove the non-UTF-8 choices to avoid confusion
if (!defined('PMA_REMOVED_NON_UTF_8')) {
$tmp_available_languages = $GLOBALS['available_languages'];
$GLOBALS['available_languages'] = array();
foreach ($tmp_available_languages AS $tmp_lang => $tmp_lang_data) {
//if (substr($tmp_lang, -5) == 'utf-8') {
$GLOBALS['available_languages'][$tmp_lang] = $tmp_lang_data;
//}
} // end foreach
unset($tmp_lang, $tmp_lang_data, $tmp_available_languages);
define('PMA_REMOVED_NON_UTF_8',1);
}
// more
// If $lang is defined and we are on MySQL >= 4.1.x,
// we auto-switch the lang to its UTF-8 version (if it exists and user didn't force language)
if (!empty($GLOBALS['lang']) && (substr($GLOBALS['lang'], -5) != 'utf-8') && !isset($GLOBALS['cfg']['Lang'])) {
$lang_utf_8_version = substr($GLOBALS['lang'], 0, strpos($GLOBALS['lang'], '-')) . '-utf-8';
if (!empty($GLOBALS['available_languages'][$lang_utf_8_version])) {
$GLOBALS['lang'] = $lang_utf_8_version;
$GLOBALS['charset'] = $charset = 'utf-8';
}
}
// and we remove the non-UTF-8 choices to avoid confusion
if (!defined('PMA_REMOVED_NON_UTF_8')) {
$tmp_available_languages = $GLOBALS['available_languages'];
$GLOBALS['available_languages'] = array();
foreach ($tmp_available_languages AS $tmp_lang => $tmp_lang_data) {
//if (substr($tmp_lang, -5) == 'utf-8') {
$GLOBALS['available_languages'][$tmp_lang] = $tmp_lang_data;
//}
} // end foreach
unset($tmp_lang, $tmp_lang_data, $tmp_available_languages);
define('PMA_REMOVED_NON_UTF_8',1);
}
// more
要显示所有语言的方式是在上面加粗的地方加两行注释。