Bug #66265 [Asn->Fbk]: gettext is not working anymore
| From: | ab@php.net | Date: | Mon, 16 Dec 2013 18:05:17 +0000 |
| Subject: | Bug #66265 [Asn->Fbk]: gettext is not working anymore | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183362@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66265&edit=1
ID: 66265
Updated by: ab@php.net
Reported by: roeycohen at gmail dot com
Summary: gettext is not working anymore
-Status: Assigned
+Status: Feedback
Type: Bug
Package: Gettext related
Operating System: windows
PHP Version: 5.5.7
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
Hi,
after further debugging it turned out, that the issue might be laying somewhere else. With CLI,
could you please try the following
- set LANG=en_US
- run php snippet.php
After that your first snippet works as well. Could you confirm that?
To install additional locales, on win8 i go to
Control Panel\All Control Panel Items\Language
Maybe that's edition dependent, but one could try.
Thanks
Previous Comments:
------------------------------------------------------------------------
[2013-12-12 11:57:40] roeycohen at gmail dot com
My current locale is indeed he_IL: hebrew(israel).
i'm not sure how to install another locale... but my machine is able to display english
characters :))
when i switch between php versions, i do it on the same machine: i stop iis, rename the php folders
and start the server again.
I also ran the script using CLI and got the same results.
------------------------------------------------------------------------
[2013-12-12 11:31:22] ab@php.net
ups, set back the php version
------------------------------------------------------------------------
[2013-12-12 11:30:11] ab@php.net
Hi,
thanks for posting the experience. However on my machine your exact snippet worked.
There's another point with gettext - the locale passed to gettext has to be present on the
system. Same on Linux, the locale has to be present (that /etc/locale.gen stuff), on Windows it has
to be installed along with the base locale. After your last discovery, is the base system locale on
your machine he_IL? Please check that en_US support is installed as well.
Is the machine where 5.4 works the same where 5.5 fails? Also, to exclude IIS, could you please try
the same on CLI?
Thanks.
------------------------------------------------------------------------
[2013-12-12 11:15:51] roeycohen at gmail dot com
hmm, apparently, trying other locales, other than he_IL doesn't fix the problem...
i've tried: es_ES, en, 'dummy', fr_FR same result as en_US.
only he_IL fixes the problem, may it has something to do with my region format being
"israel"?
------------------------------------------------------------------------
[2013-12-12 11:10:04] roeycohen at gmail dot com
ok, i found something,
if i change the folder en_US to he_IL and also use these lines instead of the original ones:
putenv("LC_ALL=he_IL");
setlocale(LC_ALL, 'he_IL');
and restart the server then everything is working fine...
i didn't had this problem in version 5.4.8 :(
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=66265
--
Edit this bug report at https://bugs.php.net/bug.php?id=66265&edit=1