php gettext调试

php gettext调试

问题描述:

I have a problem with gettext, on my local testing machine it works like a charm, on production server it doesn't. gettext seems to avoid displaing any kind of error, either it works or it doesn't.

Is there any way to debug, or to force it to log everything it does?

thanks

我遇到了gettext的问题,在我的本地测试机上它就像一个魅力,在生产服务器上它没有' t。 gettext似乎避免替换任何类型的错误,无论是工作还是不工作。 p>

有没有办法调试,或强制它记录它所做的一切? p>

谢谢 p> div>

If anybody encounter this from search engines. In my case the problem was that php didin't had any locale installed! Without locale it can't work, so always check this as sometime updating php resets locale.

Maybe your production server was not built with

--with-gettext[=DIR]

You can check if it's enabled by checking phpinfo() output. You should find a section gettext, if it was built-in.