Forums / Installing on a Windows Server / Some wrong with setlocal() on windows xp local server

Some wrong with setlocal() on windows xp local server

Locked
Results 1 to 10 of 10
This thread is locked. New replies are disabled.
14 Aug 2007, 15:43
#1
wangsclub avatar

wangsclub

New Zenner

Join Date:
Aug 2007
Posts:
6
Plugin Contributions:
0

Some wrong with setlocal() on windows xp local server

my server is windows xp sp2+ APMServ5.2:
Apache 2.2.3
  NetBox 2.8 Build 4128
 PHP 5.2.0
  MiniPerl 5.8
  MySQL 5.0.27
  MySQL 4.0.26
  SQLite 3.3.8
  phpMyAdmin 2.9.1.1
  SQLiteManager 1.2.0  ZendOptimizer 3.2.0
  OpenSSL 0.9.8d

installed Simchinese language pack (utf-8).

display wrong:该商品加入分类的日期为2003年%m月%d日

How can i settle this problem?
Thank you!
14 Aug 2007, 16:29
#3
wangsclub avatar

wangsclub

New Zenner

Join Date:
Aug 2007
Posts:
6
Plugin Contributions:
0

Re: Some wrong with setlocal() on windows xp local server

change @setlocale(LC_TIME, 'zh_CN.UTF-8');
to @setlocale ( LC_ALL, "China" );

no effect yet.
why?

What is the corect format?
Thanks
16 Aug 2007, 02:26
#4
wangsclub avatar

wangsclub

New Zenner

Join Date:
Aug 2007
Posts:
6
Plugin Contributions:
0

Re: Some wrong with setlocal() on windows xp local server

If anybody knows how to set the locale on Windows to the equivalent of "zh_CN.UTF-8" on windows xp sp2, please do tell me.
16 Aug 2007, 08:16
#5
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: Some wrong with setlocal() on windows xp local server

Assuming you leave this setting at:

[php] @setlocale(LC_TIME, 'zh_CN.UTF-8');[/php]Maybe you can try to check and play with these 2 settings as well.

[php] // Global entries for the <html> tag
define('HTML_PARAMS','dir="ltr" lang="zh"');

// charset for web pages and emails
define('CHARSET', 'UTF-8');[/php]
16 Aug 2007, 23:55
#6
wangsclub avatar

wangsclub

New Zenner

Join Date:
Aug 2007
Posts:
6
Plugin Contributions:
0

Re: Some wrong with setlocal() on windows xp local server

Yes, I just do that! But the matter going on.
17 Aug 2007, 07:21
#7
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: Some wrong with setlocal() on windows xp local server

Can you tell me where you got the language pack so I can take a closer look at it?
19 Aug 2007, 20:48
#9
canopy avatar

canopy

Totally Zenned

Join Date:
Oct 2006
Posts:
625
Plugin Contributions:
0

Re: Some wrong with setlocal() on windows xp local server

I have downloaded and experimented with the language pack you showed me.

To display the month properly if your Zen Cart runs on a Windows machine, your "schinese.php" file could have the following settings.

[php]setlocale(LC_ALL, 'Chinese_China.936');[/php][php]define('HTML_PARAMS','dir="ltr" lang="zh"');[/php][php]define('CHARSET', 'Windows-936');[/php]Unfortunately, once your month displays properly, your browser may display the rest of the characters incorrectly due to the encoding that was used to edit the translated files. You may like to contact the language pack author and discuss with him/her on the best approach for your case - taking into consideration the possibility that your live Zen Cart store will be running on a Linux/Unix machine instead of a Windows machine.

Alternatively, you can download and install the Simplified Chinese language pack in the downloads section on top of an existing English installation. That language pack is for GB2312 but you can adjust the "schinese.php" file with the above settings and see if it meets your needs assuming you are running on a Windows machine.
20 Aug 2007, 13:30
#10
wangsclub avatar

wangsclub

New Zenner

Join Date:
Aug 2007
Posts:
6
Plugin Contributions:
0

Re: Some wrong with setlocal() on windows xp local server

我已经解决了问题,谢谢canopy