php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10333 anything is OK, it really seems a buggy thing
Submitted: 2001-04-15 09:27 UTC Modified: 2002-02-20 00:00 UTC
From: daniele at dcs dot it Assigned:
Status: No Feedback Package: Gettext related
PHP Version: 4.0.4pl1 OS: Linux - Mandrake 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: daniele at dcs dot it
New email:
PHP Version: OS:

 

 [2001-04-15 09:27 UTC] daniele at dcs dot it
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-15 09:30 UTC] daniele at dcs dot it
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


 [2002-01-14 15:48 UTC] lobbin@php.net
Can you reproduce this with 4.1.1?
 [2002-02-20 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 28 09:01:28 2024 UTC