Default accept-language for Chrome on a traditional Chinese Windows machine is:
Accept-Language:zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4
However, the default language selected by phpMyAdmin is simplified Chinese which is wrong. I think there is something wrong in the file: select_lang.lib.php.
I further examined the code in the file select_lang.lib.php. The problem is in PMA_langDetect().
In this loop
"zh_CN" is iterated before "zh_TW" in array $GLOBALS['available_languages']. However, the regexp for "zh_CN" does not contain "_CN" so it does match "zh-TW".
I recommend to make the regexp string for "zh_CN" from
to
in function PMA_langDetails().
The new regexp matches all languages starting with zh but not zh_TW or zh_HK which is correct in real world. Only TW and HK use traditional Chinese while others (CN, SG, MY) use simplified one.
Last edit: benck 2013-06-05
Thanks, your solution was implemented for 4.0.4.