Bug #66265 [Com]: gettext is not working anymore

From: Date: Mon, 19 May 2014 12:16:24 +0000
Subject: Bug #66265 [Com]: gettext is not working anymore
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185858@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
 Comment by:         barry at staes dot nl
 Reported by:        roeycohen at gmail dot com
 Summary:            gettext is not working anymore
 Status:             Assigned
 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:

louisantoinem: that is not this PHP bug on Windows. (i tried adding locales but no success)
The problem here is same code stops working after PHP upgrade.


Comments/tests summarized so far:

Works:
PHP 5.3 : 5.3.28b (*1)
PHP 5.4 : 5.4.8, 5.4.19

Does not work:
PHP 5.4 : 5.4.28a (*1)
PHP 5.5 : 5.5.5, 5.5.6, 5.5.7 (*2), 5.5.8, 5.5.9, 5.5.12a (*1)


I assume all tested in Apache, except for
*1) tested in Uniform Server Zero XI by e@elasten.eu
*2) tested in ISS by roeycohen@gmail.com

More specific tests are welcome. (Windows + PHP + gettext..)


Previous Comments:
------------------------------------------------------------------------
[2014-05-19 11:50:53] louisantoinem at gmail dot com

For me, fixed by adding the needed locales, in my case:

locale-gen fr_FR.UTF-8

------------------------------------------------------------------------
[2014-05-16 07:50:27] louisantoinem at gmail dot com

same problem on PHP 5.5.9 Ubuntu 14.04
gettext seems to always select the same catalogue
worked with the exact same source code in PHP 5.3

------------------------------------------------------------------------
[2014-05-15 05:00:54] e at elasten dot eu

I have almost the same problem on Win7 64bit. The script is using the system default locale
(Hungarian) to load the .po file and not the setlocale/putenv variables, but interestingly for me
PHP 5.3.28b works and neither 5.4.28a and 5.5.12a. I am using Uniform Server Zero XI which can
switch loaded PHP version with a restart of the server.

------------------------------------------------------------------------
[2014-04-29 14:52:36] gab at forme dot it

I have the same problem on win 7 64bit, after upgrading to xampp 1.8.3 (php 5.5.9) gettext
doesn't work. With previous xampp 1.8.2 (php 5.4.27) gettext works fine.

------------------------------------------------------------------------
[2014-03-06 14:53:38] barry at staes dot nl

I experienced the regression when upgrading from XAMPP 1.8.2 to 1.8.3, which was using PHP 5.4.19
and PHP 5.5.6 respectively. Its easily reproduced, both on Windows 7 and 8.1. First
setlocale(LC_MESSAGES, 'nl_NL.UTF8') works, but after upgrade it wont. 

On a sidenote, the OS does not need to have the locales i was using via PO files installed, or have
matching names at all, but it worked excelent nonetheless. Now  it always sets the locale to the OS
language, and loads that PO files. No matter what setlocale() gets called with.

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


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


Thread (33 messages)

« previous php.bugs (#185858) next »