#21447 [Opn->Fbk]: gettext stopped working

From: Date: Mon, 06 Jan 2003 00:58:36 +0000
Subject: #21447 [Opn->Fbk]: gettext stopped working
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-29165@lists.php.net to get a copy of this message
ID: 21447 Updated by: iliaa@php.net Reported By: vigna@acm.org -Status: Open +Status: Feedback Bug Type: Gettext related Operating System: Linux Red Hat 8.0 PHP Version: 4.2.2 New Comment: Which worker model are you using? If you are using a thread based (worker) model you should be aware that gettext library is NOT thread safe and therefor you will encounter problems when you try using it within the threaded enviroment. Previous Comments: ------------------------------------------------------------------------ [2003-01-05 18:55:58] vigna@acm.org After installing Red Hat Linux 8.0 with Apache 2, gettext support stopped working. I am using the sequence of calls putenv("LANG=".$_ERW_locale); setlocale(LC_MESSAGES, $_ERW_locale); bindtextdomain("ERW", $_ERW_localePath); textdomain("ERW"); to bind the text domain, and this worked perfectly in several different ERW installations (http://erw.dsi.unimi.it/) up to the upgrade. It is very difficult to give any other hint. If you create a script like <?php putenv("LANG=it_IT"); setlocale(LC_MESSAGES, "it_IT"); bindtextdomain("ERW", "/home/vigna/cvs/ERW/php/locale"); textdomain("ERW"); print _("something translated"); ?> and the translation file is located as follows /home/vigna/cvs/ERW/php/locale/it_IT/LC_MESSAGES/ERW.mo the string does not get translated. The complete lack of feedback of any of the gettext package functions makes it also very difficult to understand what's going wrong. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21447&edit=1

« previous php.bugs (#29165) next »