Skip Menu |

This queue is for tickets about the libintl-perl CPAN distribution.

Report information
The Basics
Id: 13957
Status: resolved
Priority: 0/
Queue: libintl-perl

People
Owner: Nobody in particular
Requestors: michael.bell [...] cms.hu-berlin.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Examples does not work
Hi, I noticed that the examples does not work and I use the modules for the i18n of a web application. After a while I noticed that Debian sets $LANGUAGE by default and libc ignores setlocale if it detects a set environment variable. The only clean way is nl_putenv or delete $ENV{LANGUAGE}. I found the problem by reading the description of some libc stuff. It is perhaps a good idea to add a fat warning that the setlocale examples and your own code only work if the environment is erased. Can you please add such a comment to the examples of Locale::Messages? It was fairly uncommon to me that the environment ($LANGUAGE) overrides the functional interface (setlocale). If you want that I fix the pod by myself and send it to you then please write a notice. Michael
Hi, [guest - Mon Aug 1 09:54:35 2005]: Show quoted text
> Hi, > > I noticed that the examples does not work and I use the modules for > the i18n of a web application. After a while I noticed that Debian > sets $LANGUAGE by default and libc ignores setlocale if it detects > a set environment variable. The only clean way is nl_putenv or > delete $ENV{LANGUAGE}.
Yes, this is described in "sample/simplecal/README-NLS". Anyway: The entire problem is platform-dependent. Your findings only apply to GNU systems, the environment variable "LANGUAGE" is a GNU extension. Try "perldoc perllocale" to get an idea about the complexity. Show quoted text
> > I found the problem by reading the description of some libc stuff. It > is perhaps a good idea to add a fat warning that the setlocale > examples and your own code only work if the environment is erased.
Again, this is really platform-dependent. But I will point that out clearer in the READMEs. Show quoted text
> Can you please add such a comment to the examples of Locale::Messages? > It was fairly uncommon to me that the environment ($LANGUAGE) > overrides the functional interface (setlocale). If you want that I > fix the pod by myself and send it to you then please write a > notice.
Which POD do you exactly mean? Thanks for your report. Regards, Guido