[Perlwebmail-devel] Language selection Problem

Lawrence aBeL @ PPMail.Com abel@ppmail.com
Sat, 13 Jul 2002 17:34:46 +0800


Dear all,

Some errors were found when using Chinese languages. The errors were caused
by a typo (an underscore instead of a hyphen).

Below is a simple patch.

Regards
Lawrence

-----------------------------
@@ -115,13 +115,13 @@
 }elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^ja/i){ # Japanese
        require PerlWebmail::Language_ja;
        import PerlWebmail::Language_ja;
-}elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^zh_tw/i){ # Chinese - Taiwan
+}elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^zh-tw/i){ # Chinese - Taiwan
        require PerlWebmail::Language_zh_tw;
        import PerlWebmail::Language_zh_tw;
-}elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^zh_hk/i){ # Chinese - Hong Kong
+}elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^zh-hk/i){ # Chinese - Hong Kong
        require PerlWebmail::Language_zh_hk;
        import PerlWebmail::Language_zh_hk;
-}elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^zh_cn/i){ # Chinese - Mainland
+}elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^zh-cn/i){ # Chinese - Mainland
        require PerlWebmail::Language_zh_cn;
        import PerlWebmail::Language_zh_cn;
 }elsif(http("HTTP_ACCEPT_LANGUAGE") =~ /^zh/i){ # Chinese - Others