Bug #66265 [Com]: gettext is not working anymore
| From: | dev at ms-software dot de | Date: | Fri, 24 Jun 2016 09:18:51 +0000 |
| Subject: | Bug #66265 [Com]: gettext is not working anymore | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-201820@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: dev at ms-software dot de
Reported by: roeycohen at gmail dot com
Summary: gettext is not working anymore
Status: Closed
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:
It seemâs, that gettext with virtual server on Windows doesnât work. If I install it to
localhost all thinks work well, on my virtual server, gettext do not translate anything!
Previous Comments:
------------------------------------------------------------------------
[2015-12-02 12:03:03] roeycohen at gmail dot com
to work around this issue, i moving to translation arrays.
since php 5.5 when opcache is on, the performance of loading an array of translation or the mo file
is about the same (at least from my benchmarks).
------------------------------------------------------------------------
[2015-12-02 11:10:34] lafleurpy at gmail dot com
Same issue with wamp server 2.5 32bits on Windows 7 (with PHP : 5.5.12).
I confirm the trick given by sirio3mi to make gettext working.
It seems that only the folder with the current system locale is readable (for me /fr_BE).
Dictionaries in others directories (as /nl_BE) can't be loaded.
So I put all my POedit dictionaries in /fr_BE/LC_MESSAGES/ and named them with their corresponding
locale (ex : nl_BE.mo + nl_BE.po).
It's maybe dirty, but it works.
Here is the PHP code :
bind_textdomain_codeset ({your locale}, {your char codeset});
bindtextdomain ({your locale}, {absolute path to locale directory});
textdomain ({your locale});
setlocale (LC_ALL,{your locale});
putenv('LC_ALL=' . {your locale});
For making short : use the same locale directory but change the domain when you change the language.
------------------------------------------------------------------------
[2015-04-29 22:29:15] sirio3mil at gmail dot com
Hi, I have same problem with PHP 5.6.6 and 5.6.7 both TS x64 running on Apache over Windows Server
2008 R2 and Windows 10 TP.
I get only the translations to the default system lamguage (Control Panel) Temporary I change
location from all my .mo files to this folders and change domain to get correct translations.
------------------------------------------------------------------------
[2015-03-06 11:51:16] alvaro at demogracia dot com
Is there a new ticket for TS builds?
------------------------------------------------------------------------
[2014-11-26 16:21:28] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=56fac96bec882ac59a7fc298c98407bf4a17629d
Log: partially fixed bug #66265
------------------------------------------------------------------------
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