php-i18n Digest 23 Sep 2005 13:39:15 -0000 Issue 295
Topics (messages 876 through 876):
gettext() troubles
876 by: Denis Gerasimov
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Hello List,
I am facing some troubles with gettext.
phpinfo() says that both of gettext and iconv extensions are installed
properly, I can call gettext() function but it never translates my strings
returning the original key every time.
Here is the code:
<?php
putenv("LANG=ru_RU");
setlocale (LC_ALL,"ru");
$domain = 'messages';
echo bindtextdomain ($domain, 'D:\intranet\wwwroot\lng');
echo textdomain ($domain);
echo bind_textdomain_codeset($domain, 'UTF-8');
echo gettext("string");
?>
Below is the output:
D:\intranet\wwwroot\lng
messages
UTF-8
string
All of the language files are in the following location:
D:\intranet\wwwroot\lng\ru\LC_MESSAGES\
D:\intranet\wwwroot\lng\ru\LC_MESSAGES\messages.po
D:\intranet\wwwroot\lng\ru\LC_MESSAGES\messages.mo
The files were created with poEdit utility and look fine.
Any help would be greatly appreciated.
Have a great day,
Denis S Gerasimov
Web Developer
Team Force LLC
Web: <http://www.team-force.org/> www.team-force.org
RU & Int'l: +7 8362-468693
email: [EMAIL PROTECTED]
--- End Message ---