Bug #17304 Updated: Cannot get gettext working
| From: | mfischer@php.net | Date: | Sat, 18 May 2002 13:56:09 +0000 |
| Subject: | Bug #17304 Updated: Cannot get gettext working | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-7989@lists.php.net to get a copy of this message | ||
ID: 17304
Updated by: mfischer@php.net
Reported By: jsakalos@bigfoot.com
-Status: Feedback
+Status: Open
Bug Type: Documentation problem
Operating System: Linux
PHP Version: 4.2.0
Previous Comments:
------------------------------------------------------------------------
[2002-05-18 09:55:59] mfischer@php.net
Good idea.
------------------------------------------------------------------------
[2002-05-18 09:54:36] jsakalos@bigfoot.com
Thanks,
when I use setlocale instead of putenv it works fine.
The documentation should be updated accordingly as, sticking on it, I
lost a day doing trial and error.
Someone else might too...
------------------------------------------------------------------------
[2002-05-18 07:00:34] mfischer@php.net
Have you tried php.net/setlocale ?
------------------------------------------------------------------------
[2002-05-18 06:55:52] jsakalos@bigfoot.com
I use SuSE Linux 7.3 distribution but I compiled
PHP 4.2.0 from source as an apache module
--with-apxs and --with-gettext=/usr
I also compiled gettext 0.11.2 from source. I tried also
--with-included-gettext in vain.
When I use gettext from command line, it works:
env LANG=sk_SK gettext -sd bsis "This I want to translate"
Toto chcem prelozit
or, when my locale is not in /usr/share/locale
env LANG=sk_SK TEXTDOMAINDIR=/web/bsis/locale gettext ....
The PHP script I use is:
putenv("LANG=sk_SK");
bindtextdomain("bsis", "./locale");
textdomain("bsis");
echo _("This I want to translate");
Running this script I always get only the english text.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17304&edit=1