use Traditional Chinese for Hong Kong users

This commit is contained in:
Alexander M. Turek
2004-10-12 21:29:08 +00:00
parent 751404c428
commit 6f96840173
4 changed files with 14 additions and 10 deletions

View File

@@ -9,6 +9,10 @@ $Source$
* db_search.php, tbl_select.php, libraries/database_interface.lib.php:
- bug #1033388 (Illegal mix of collations for converted strings),
- don't convert if column charset and connection charset match.
* main.php, libraries/select_lang.lib.php,
libraries/auth/cookie.auth.lib.php: Automatically select Traditional
Chinese for users with a Hong Kong locale (zh-hk), as discussed in the
translations tracker (#1036528).
2004-10-12 Michal Čihař <michal@cihar.com>
* sql.php: Don't try to require sql.php with parameters, rather redirect

View File

@@ -276,7 +276,7 @@ if (top != self) {
uasort($available_languages, 'PMA_cookie_cmp');
foreach ($available_languages AS $id => $tmplang) {
$lang_name = ucfirst(substr(strstr($tmplang[0], '|'), 1));
$lang_name = ucfirst(substr(strrchr($tmplang[0], '|'), 1));
if ($lang == $id) {
$selected = ' selected="selected"';
} else {

View File

@@ -122,8 +122,8 @@ $available_languages = array(
'no-utf-8' => array('no|norwegian', 'norwegian-utf-8', 'no'),
'pl-iso-8859-2' => array('pl|polish', 'polish-iso-8859-2', 'pl'),
'pl-utf-8' => array('pl|polish', 'polish-utf-8', 'pl'),
'ptbr-iso-8859-1' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese-iso-8859-1', 'pt-BR'),
'ptbr-utf-8' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese-utf-8', 'pt-BR'),
'ptbr-iso-8859-1' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese-iso-8859-1', 'pt-BR'),
'ptbr-utf-8' => array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese-utf-8', 'pt-BR'),
'pt-iso-8859-1' => array('pt|portuguese', 'portuguese-iso-8859-1', 'pt'),
'pt-utf-8' => array('pt|portuguese', 'portuguese-utf-8', 'pt'),
'ro-iso-8859-1' => array('ro|romanian', 'romanian-iso-8859-1', 'ro'),
@@ -140,10 +140,10 @@ $available_languages = array(
'sl-utf-8' => array('sl|slovenian', 'slovenian-utf-8', 'sl'),
'sq-iso-8859-1' => array('sq|albanian', 'albanian-iso-8859-1', 'sq'),
'sq-utf-8' => array('sq|albanian', 'albanian-utf-8', 'sq'),
'srlat-win1250' => array('sr[-_]lat|serbian latin', 'serbian_latin-windows-1250', 'sr-lat'),
'srlat-utf-8' => array('sr[-_]lat|serbian latin', 'serbian_latin-utf-8', 'sr-lat'),
'srcyr-win1251' => array('sr|serbian', 'serbian_cyrillic-windows-1251', 'sr'),
'srcyr-utf-8' => array('sr|serbian', 'serbian_cyrillic-utf-8', 'sr'),
'srlat-win1250' => array('sr[-_]lat|serbian latin', 'serbian_latin-windows-1250', 'sr-lat'),
'srlat-utf-8' => array('sr[-_]lat|serbian latin', 'serbian_latin-utf-8', 'sr-lat'),
'srcyr-win1251' => array('sr|serbian', 'serbian_cyrillic-windows-1251', 'sr'),
'srcyr-utf-8' => array('sr|serbian', 'serbian_cyrillic-utf-8', 'sr'),
'sv-iso-8859-1' => array('sv|swedish', 'swedish-iso-8859-1', 'sv'),
'sv-utf-8' => array('sv|swedish', 'swedish-utf-8', 'sv'),
'th-tis-620' => array('th|thai', 'thai-tis-620', 'th'),
@@ -152,8 +152,8 @@ $available_languages = array(
'tr-utf-8' => array('tr|turkish', 'turkish-utf-8', 'tr'),
'uk-win1251' => array('uk|ukrainian', 'ukrainian-windows-1251', 'uk'),
'uk-utf-8' => array('uk|ukrainian', 'ukrainian-utf-8', 'uk'),
'zhtw-big5' => array('zh[-_]tw|chinese traditional', 'chinese_traditional-big5', 'zh-TW'),
'zhtw-utf-8' => array('zh[-_]tw|chinese traditional', 'chinese_traditional-utf-8', 'zh-TW'),
'zhtw-big5' => array('zh[-_](tw|hk)|chinese traditional', 'chinese_traditional-big5', 'zh-TW'),
'zhtw-utf-8' => array('zh[-_](tw|hk)|chinese traditional', 'chinese_traditional-utf-8', 'zh-TW'),
'zh-gb2312' => array('zh|chinese simplified', 'chinese_simplified-gb2312', 'zh'),
'zh-utf-8' => array('zh|chinese simplified', 'chinese_simplified-utf-8', 'zh')
);

View File

@@ -518,7 +518,7 @@ if (empty($cfg['Lang'])) {
uasort($available_languages, 'PMA_cmp');
foreach ($available_languages AS $id => $tmplang) {
$lang_name = ucfirst(substr(strstr($tmplang[0], '|'), 1));
$lang_name = ucfirst(substr(strrchr($tmplang[0], '|'), 1));
if ($lang == $id) {
$selected = ' selected="selected"';
} else {