tags:

views:

35

answers:

1

I have Win XP + IIS + PHP (fastcgi) installed.

I want to use gettext for multilanguage application. My php code (index.php):

bindtextdomain('APP', './locale');
textdomain('APP');

And I have following directory structure:

src\index.php
src\locale\en\LC_MESSAGES\APP.mo
src\locale\ru\LC_MESSAGES\APP.mo

So, the code works, but only if I setup enviroment variable LANG in My Computer's properties (and if I want to change it, I must restart IIS). But when I'm trying change environment variable using putenv('LANG=en'), it does not work.

Is there any other way to tell gettext which language to use?

+1  A: 

What version of PHP are you using? Could it be PHP 5.3? If yes, then check PHP Bug #49349.

Alix Axel
Yes, the version was 5.3.1.Thanks
Kerb
@Kerb: Let me know if that solves it.
Alix Axel