#19153 [Opn->Bgs]: Gettext not working correctly

From: Date: Wed, 04 Sep 2002 04:48:45 +0000
Subject: #19153 [Opn->Bgs]: Gettext not working correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18378@lists.php.net to get a copy of this message
ID: 19153 Updated by: kalowsky@php.net Reported By: pepek@pobox.sk -Status: Open +Status: Bogus Bug Type: Gettext related Operating System: Linux PHP Version: 4.2.2 New Comment: Marking this as bogus, due to what I rememeber of gettext this is standard behavior (aka not a PHP issue). If I'm wrong, re-open the bug. Previous Comments: ------------------------------------------------------------------------ [2002-08-28 11:36:01] pepek@pobox.sk Hi, I compiled PHP 4.2.2 with gettext support on Mandrake 8.2, gettext is of version 0.10.40 (default in Mandrake distr.) Everything is working FINE for locales that I have installed in Mandrake, but for any other locales gettext fails to read mo file. I tested it with a fictive locale, xx_XX: ***************** putenv('LANG=xx_XX'); putenv('LANGUAGE=xx_XX'); setlocale(LC_ALL, 'xx_XX'); setlocale(LC_MESSAGES, 'xx_XX'); bindtextdomain('messages', './locale'); textdomain('messages'); echo _("select"); ***************** this script didn't work. But it started to work after I created directory /usr/share/locale/xx_XX and copied there content of en (or any other locale) directory. It looks like gettext needs to read something from /usr/share/locale first. Is it feature or bug? Binary gettext works correctly even without /usr/share/locale/xx_XX directory. In bash I successfuly ran: ******************************* $ export LANGUAGE=xx_XX $ export TEXTDOMAINDIR=./locale $ export TEXTDOMAIN=messages $ gettext "select" Vyber-xx-OK ******************************* And nothing changed after I installed the newest gettext and recompiled php with --with-gettext=/usr/local My configuration is: ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/etc \ --with-pear \ --enable-magic-quotes \ --disable-short-tags \ --with-gettext=/usr/local \ --with-mysql \ --with-zlib Peter Belak pepek@pobox.sk ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19153&edit=1

« previous php.bugs (#18378) next »