This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11869] New: LANGUAGE not taken into account unless LC_MESSAGES is set to non-POSIX


The glibc manual says:

   The LOCALE component is computed based on the category used.  Just
like for the `setlocale' function here comes the user selection into
the play.  Some environment variables are examined in a fixed order and
the first environment variable set determines the return value of the
lookup process.  In detail, for the category `LC_xxx' the following
variables in this order are examined:

`LANGUAGE'

`LC_ALL'

`LC_xxx'

`LANG'

but the LANGUAGE environment variable is not taken into account unless
LC_MESSAGES to set to some valid non-POSIX locale.

ypig% unset LC_MESSAGES
ypig% LANGUAGE=fr_FR:fr cp
cp: missing file operand
Try `cp --help' for more information.
ypig% LANGUAGE=fr_FR:fr LC_MESSAGES=en_US.ISO8859-1 cp
cp: opérande fichier manquant
Saisissez « cp --help » pour plus d'informations.

Note that I've chosen to set LC_MESSAGES to English to show that LANGUAGE has
the precedence, as documented. The bug is that the LC_MESSAGES environment
variable must be set, even though its language isn't used (BTW this is rather
confusing as setting LC_MESSAGES to English has the effect of switching the
language to French!). The value of LC_MESSAGES has some importance, though. With
POSIX or C, I still get English messages:

ypig% LANGUAGE=fr_FR:fr LC_MESSAGES=POSIX cp
cp: missing file operand
Try `cp --help' for more information.

-- 
           Summary: LANGUAGE not taken into account unless LC_MESSAGES is
                    set to non-POSIX
           Product: glibc
           Version: 2.11
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: vincent+libc at vinc17 dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11869

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]