[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

will PHP and GNU gettext work properly with Apache?

From: Dave Patton [DCP]
Subject: will PHP and GNU gettext work properly with Apache?
Date: Mon, 07 Feb 2005 09:39:01 -0800
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

Can someone point me to a definitive source for the
answers to the following two questions:

In an environment with Redhat Linux 2.4.21-27.0.1,
Apache 1.3.31, PHP 4.3.10, and GNU gettext 0.14.1,
will using PHP's gettext support along with the
GNU gettext utilities work properly?
For example, I've seen references to the translated
strings in .mo files not always being what appears
on webpages, presumably due to the caching built
into GNU gettext.

In December 2003, in the php.i18n newsgroup, in a posting titled
"GNU gettext support for PHP programs", Bruno Haible said:
- The just-released GNU gettext 0.13 has improved support
  for PHP programs
- Unfortunately, GNU gettext is not yet ready for being used
  in a multithreaded environment where each thread may need
  to use a different locale/language.

The README file in the hello-php directory for GNU gettext
0.14.1 says:
The gettext/PHP binding has a limitation: While it works fine for
standalone PHP programs, it cannot be used inside a web server, to
translate parts of web pages into the preferred encoding of user
that makes a HTTP connection. The reason is that a web server
usually is multithreaded, and the gettext() API relies on the
process' global locale.

Do the above statements mean that using GNU gettext with PHP
and Apache 2.0 will not work? Does anyone know if there are
plans to change GNU gettext to support multiple threads?


Apologies if this isn't the correct place to ask these
questions. On Feb 2 I posted the same questions to the
gnu.utils.help and comp.lang.php newsgroups, but didn't
get any response. I don't know if that's because nobody
knew the answers, of because maybe the mail/news gateway
between help-gnu-utils and gnu.utils.help is such that
my newsgroup posting wasn't distributed on the mailing list.

Dave Patton
Canadian Coordinator, Degree Confluence Project
My website: http://members.shaw.ca/davepatton/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]