ofourdan has asked for the wisdom of the Perl Monks concerning the following question:

Hi there! I'm having trouble with setlocale. I'm desperatly trying to use gettext with perl, as far as I can see, it seems to work ok except for the locale setting. Whatever value I set it, it uses LANG to override my settings. I've tried to set LC_MESSAGES, LC_ALL, etc. and the value I set is simply ignored, overridden by the shell variable $LANG.. Is there anything I'm doing wrong here ? I've searched on perl.com and I'm pretty sure I use setlocale as I should... TIA. Olivier.

Replies are listed 'Best First'.
RE: setlocale problem
by lhoward (Vicar) on May 22, 2000 at 16:40 UTC
    I don't see anything in the Locale::gettext module that would cause it to get the setting from the environmental variable LANG. If you want to override the LANG environmental varible you could try putting:
    $ENV{LANG}='';
    in your code.