[Multilanguage support]: Apache + PHP 5.x + gettext
| From: | Davi Leal | Date: | Sat, 08 Apr 2006 10:14:32 +0000 |
| Subject: | [Multilanguage support]: Apache + PHP 5.x + gettext | ||
| Groups: | php.i18n | ||
| Request: | Send a blank email to php-i18n+get-994@lists.php.net to get a copy of this message | ||
Hi,
About multilanguage website support, if we can not use 'gettext', due to the
below rationale, what technology should we use?.
* Reference: http://www.php.net/manual/en/function.setlocale.php
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().
* Reference: http://www.php.net/gettext
dpatton at confluence dot org 28-Feb-2005
Make sure you check your webserver configuration before deciding to use
gettext, because if you are running in a multi-threaded environment you
should not use gettext, as it is not thread-safe.
A future version of gettext(possibly 0.15) may be thread-safe.
Any gettext dependencies, such as glibc would also need to be thread-safe.
Apache 1.3 on Unix generally is non-threaded, but on Windows it is
multithreaded.
Apache 2.0 has support for MPMs(Multi-Processing Modules), some of which
support multiple threads: http://httpd.apache.org/docs-2.0/mpm.html
P.S.: Any advice will help me follow working slowly but surely.
Regards,
Davi