4

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

I want to use gettext for multilanguage application.

index.php:

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

Directory structure:

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

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

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

gniourf_gniourf
  • 44,650
  • 9
  • 93
  • 104
Kerb
  • 1,138
  • 2
  • 20
  • 39

1 Answers1

1

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

Alix Axel
  • 151,645
  • 95
  • 393
  • 500