显示标签为“locale”的博文。显示所有博文
显示标签为“locale”的博文。显示所有博文

20100305

[PHP] Failed in setlocale()

===========
setlocale(LC_ALL, "zh_CN");
===========
But failed and return FALSE.

Try to list the locales contained in the locale archive file.
===============
# localedef --list-archive
===============

If "zh_CN" is not in the list, try to add it.
===============
# localedef -f GBK -i zh_CN zh_CN
===============

Ref:
http://bbs.php.cn/php/ref.gettext.html#43165
http://docs.php.net/manual/en/function.setlocale.php
# man localedef