coppermine-gallery.com/forum

Support => 中文 (Chinese) => Closed boards => Language Specific Support => cpg1.4.x 中文 (Chinese) => Topic started by: lwq on January 27, 2006, 07:45:29 AM

Title: Chinese Slimpified
Post by: lwq on January 27, 2006, 07:45:29 AM
Is there any langauge packs for chinese slimplified?The preinstall one is in traditional.
Title: Re: Chinese Slimpified
Post by: Joachim Müller on January 27, 2006, 08:36:41 AM
http://cvs.sourceforge.net/viewcvs.py/coppermine/stable/lang/chinese_gb.php
Title: Re: Chinese Slimpified
Post by: hicloud on February 07, 2006, 02:34:00 PM
我用官方的chinese.gb的unicode版转了一个GB2312版的,一般用用还可以,但就是有个小问题,就是注意用户名不能用中文的,一用中文,他就说"用户名至少2个字符",估计是计数函数用得不对,不知有没有哪位解决过这个问题?


I have a slimpified lang file(charset gb2312) translated from official unicode version, an my gallary work well with it except that I cannot use Chinese username. It says that "username must be 2 charactors at least" while my Chinese username is longer than 2. I think it's caused by the function which get the string length, is there anybody has solved this problem by modify the source code for that?
Title: Re: Chinese Slimpified
Post by: hicloud on February 07, 2006, 03:06:34 PM
I tried to solve the problem of not-use-Chinese-username by modified the usermgr.php as below:

find the line 755:

if (utf_strlen($user_name) < 2) cpg_die(ERROR, $lang_register_php['err_uname_short'], __FILE__, __LINE__);


changed to :
if ($CONFIG['charset'] != 'euc-cn') $user_length=utf_strlen($user_name); else $user_length=strlen($user_name);

if ($user_length < 2) cpg_die(ERROR, $lang_register_php['err_uname_short'], __FILE__, __LINE__);

Then you can use Chinese username under GB2312 charset.

I don't if it will cause other problem or not. If you find any error after using this modification, please tell me. thank you!
Title: Re: Chinese Slimpified
Post by: Joachim Müller on February 09, 2006, 08:50:42 AM
I filed a bug thread about this - although your fix may work for you, but other non-latin encodings may suffer from the same issues, so this needs to be fixed permanently. See http://forum.coppermine-gallery.net/index.php?topic=27658.0
Title: Re: Chinese Slimpified
Post by: Joachim Müller on August 10, 2006, 09:08:33 AM
Issue appears to have been solved. Upgrading to the most recent coppermine version should fix this. Marking thread accordingly.