From:             [EMAIL PROTECTED]
Operating system: Linux - Mandrake 7.2
PHP version:      4.0.4pl1
PHP Bug Type:     Gettext related
Bug description:  anything is OK, it really seems a buggy thing

I have compiled php with the following options (from 
phpinfo() output):

'./configure' '--with-apxs=/usr/sbin/apxs' '--with-mysql' 
'--with-zlib' '--with-config-file-path=/etc' '--with-bz2' 
'--enable-ftp' '--with-gd' '--with-unixODBC' 
'--enable-inline-optimization' '--with-gettext'

Always from phpinfo, i get this line:

GNU GetText Support => enabled

so, it seems gettext has been installed properly.
I have also built gettext from sources (I already had both 
gettext and gettext-devel installed as RPMs), and put it 
in its standard location (/usr/local).

So, I write a script like the following:

putenv ("LANG=it");
putenv ("LC_ALL=it"); 
bindtextdomain ("messages", "./locale");
textdomain ("messages");
echo _("welcome");

(as concernes the first two lines, I've tried out all of 
the possible permutations, changing their order, 
commenting the first, then the latter and so on)

then I put a valid file in the 
./locale/it/LC_MESSAGES directory, and correctly compiled 
it with the command

msgfmt -f -v -o messages.po

so, I'm sure the file is correctly compiled as the -v 
option gave clear output.
In the file there is a valid replacement for "welcome":
        msgid "welcome"
        msgstr "benvenuto"
but the string (though it compiles without errors) 
would'nt be translated.
So, the problem is this.
Good job!


Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to