From: Mikael M. <mik...@tj...> - 2004-01-12 12:08:52
|
Hi, answer follows. On Mon, Jan 12, 2004 at 11:35:17AM +0800, Arick Lee wrote: > Hi all, > I have problem when using the Chinese Simplify Translaction. No word can > display correctly in the web page and no character set was selected by > browser (IE and Mozilla). > > My i18n.php file. > $languages['en_US']['NAME'] = 'English'; > $languages['en_US']['CHARSET'] = 'iso-8859-1'; > $languages['en']['ALIAS'] = 'en_US'; > > $languages['zh_TW']['NAME'] = 'Chinese Trad'; > $languages['zh_TW']['CHARSET'] = 'big5'; > $languages['tw']['ALIAS'] = 'zh_TW'; > > $languages['zh_CN']['NAME'] = 'Chinese Simp'; > $languages['zh_CN']['CHARSET'] = 'gb2312'; > $languages['cn']['ALIAS'] = 'zh_CN'; > > Both English and Chinese Trad can work find but not Chinese Simp. Please > suggest. > > Arick > Your problem may be related to a problem with the Swedish translation that I have had. I have two Swedish locale definitions i my system: sv_SE.UTF-8 UTF-8 sv_SE.ISO-8859-1 ISO-8859-1 But the Swedish translation didn't work in Squirrelmail since the sv_SE locale wasn't defined. This can be solved by adding the full locale name to i18n.php for all locales, which is the way I prefer. Or it can be solved on each system, by defining the short locale (without encoding) or adding a locale alias. If my assumptions are correct, your problem can be solved if you edit the i18n.php as follows: $languages['zh_CN']['NAME'] = 'Chinese Simp'; $languages['zh_CN']['CHARSET'] = 'gb2312'; $languages['zh_CN']['LOCALE'] = 'zh_CN.gb2312'; $languages['cn']['ALIAS'] = 'zh_CN'; I don't know if there are any good reasons that the full locale names aren't used for all locales. Since when zh_CN.gb2312 is requested it will use zh_CN instead if it can't find the zh_CN.gb2312 definitions. But it doesn't work the other way around. I.e. when zh_CN is requested and it can't be found in the system, it will not use zh_CN.gb2312 instead. Regards, Mikael |