ID: 10333
Updated by: lobbin
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Bug Type: Gettext related
Operating System: Linux - Mandrake 7.2
PHP Version: 4.0.4pl1
New Comment:

Can you reproduce this with 4.1.1?


Previous Comments:
------------------------------------------------------------------------

[2001-04-15 09:30:58] [EMAIL PROTECTED]

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 messages.po file in the 
./locale/it/LC_MESSAGES directory (I tried both with a 
xgettext generated and not), and correctly compiled 
it with the command

msgfmt -f -v -o messages.mo 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!

Daniele



------------------------------------------------------------------------

[2001-04-15 09:27:29] [EMAIL PROTECTED]

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 messages.mo file in the 
./locale/it/LC_MESSAGES directory, and correctly compiled 
it with the command

msgfmt -f -v -o messages.mo 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!

Daniele


------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=10333&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
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