|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-03 23:48 UTC] kalowsky@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 20:00:01 2025 UTC |
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