gettext实现网站国际化语言,当apache线程多时setlocale会出错不能正确显示设置的语言(偶发 --显示默认的语言) ,线程越多,错误越多。
setlocale
(PHP 4, PHP 5)setlocale — Set locale information
Warning 
The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server api like IIS or Apache on Windows you may experience sudden changes of locale settings while a script is running although the script itself never called setlocale() itself. This happens due to other scripts running in different threads of the same process at the same time changing the processwide locale using setlocale(). 
这个php手册中的警告,但以上指的是windows服务器,我应用的是RED HAT,也会出现这问题。