php-i18n Digest 8 Apr 2006 09:49:59 -0000 Issue 323

Topics (messages 994 through 994):

[Multilanguage support]: Apache + PHP 5.x + gettext
        994 by: Davi Leal

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin 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

--- End Message ---

Reply via email to