Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-01-30 02:42:15
- playpiggy
- Member
- From: Changchun, China
- Registered: 2004-11-23
- Posts: 55
Textpattern can't recognize the right locale
I ran a Chinese blog on a Joyent’s Shared Accelerators Server, and had the admin to install the necessary locales. The Textpattern language was set to Simplified Chinese, but the locale displayed in the diag tab wasn’t zh_CN.UTF-8, so that the date was not be showed correctly. The admin could’t figure out what the problem was, and said maybe it was a Solaris bug. Any suggestions?
Here are the Chinese-related locales on the server.
[root@harrison ~]# locale -a|grep zh
zh
zh.GBK
zh.UTF-8
zh_CN.EUC
zh_CN.GBK
zh_CN.UTF-8
zh_HK.BIG5HK
zh_HK.UTF-8
Last edited by playpiggy (2008-01-30 02:44:24)
Welcome to the REAL World…
Offline
#2 2008-01-30 20:44:18
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Textpattern can't recognize the right locale
Create a new PHP file with the following contents, run it and see what output you get:
<?php
var_dump(setlocale(LC_TIME, array('zh_CN.UTF-8', 'zh_CN')));
?>
My guess is that you’ll get back bool(false)
, which means: “…the locale functionality is not implemented on your platform, the specified locale does not exist…” or a misconfiguration or bug in your server OS (Solaris, in this case).
Offline
#3 2008-01-31 03:41:59
- playpiggy
- Member
- From: Changchun, China
- Registered: 2004-11-23
- Posts: 55
Re: Textpattern can't recognize the right locale
Thank you Mary. I tried the code, and your guess was right. Is there a way to get details of the problem?
I think the locales are available on the server. Does PHP needs configured to work with the new-added locales?
Welcome to the REAL World…
Offline
#4 2008-02-04 05:12:13
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Textpattern can't recognize the right locale
Does PHP needs configured to work with the new-added locales?
No, but the server does have to be rebooted, I think.
I think the locales are available on the server.
Are you able to run commandline? If so, running this:
locale -a
should output a list of all the locales available.
Offline