$LANG and $LANGUAGE not documented in locale manual page

Bug #311558 reported by Kalman Noel
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
Triaged
Low
Unassigned
glibc (Ubuntu)
New
Undecided
Unassigned
manpages (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: belocs-locales-bin

'locale' prints not only the values of LC_*, but also LANG and LANGUAGE. These variables should be appropriately documented in the manpage.

Tags: manpage
Revision history for this message
Rolf Leggewie (r0lf) wrote :

"man 3 gettext" has some information about the LANGUAGE variable. The locale stuff is pretty complicated and I was thankful for some explanations I received from Ralf Doering in bug 190193. I found that http://www.linux.com/feature/53781 explains the subject pretty well.

Changed in belocs-locales-bin (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Rolf Leggewie (r0lf)
affects: belocs-locales-bin (Ubuntu) → eglibc (Ubuntu)
Revision history for this message
Rolf Leggewie (r0lf) wrote :

I just commented on the related bug 872343

"documentation of the meaning and hierarchy of LANG, LANGUAGE and LC_ is scattered across a number of places which I agree is unfortunate. [...] I'd think that having it documented in only one place and have other manpages refer to that places would be the way to go."

Maybe we can prepare a list of where this stuff is currently documented.

man 1 locale
man 3 gettext
man 3 setlocale

Revision history for this message
Stéphane Aulery (lkppo) wrote :

It's also in

man 7 environ

Revision history for this message
Stéphane Aulery (lkppo) wrote :

Hi,

It would be nice to have the manpage of setlocale updated to declare that the env variable "LANGUAGE" will be read to get the language.
It should also state that the variable LANGUAGE will be the first one (before LC_ALL or LANG).

Thanks.
For the record, the bug #700213 describes a problem about that.

[This comment is merged from Bug #872343, which is more or less a duplicate.]

Revision history for this message
Michael Kerrisk (mtk-manpages) wrote :

In reply to the initial report:

> 'locale' prints not only the values of LC_*, but also LANG and LANGUAGE.

Does it really do this on Ubuntu? On my Fedora system, locale(1) displays LANG, but not LANGUAGE. This is consistent with the fact that LANGUAGE is gettext-specific, as I understand it.

Revision history for this message
Michael Kerrisk (mtk-manpages) wrote : Re: [Bug 311558] Re: $LANG and $LANGUAGE not documented in locale manual page

Hi Stéphane.

See my reply into the bug. The reporter is confused. AFAIK,
setlocale() ignores LANGUAGE.

Cheers,

Michael

On 17 February 2016 at 00:51, Stéphane Aulery <email address hidden> wrote:
> Hi,
>
> It would be nice to have the manpage of setlocale updated to declare that the env variable "LANGUAGE" will be read to get the language.
> It should also state that the variable LANGUAGE will be the first one (before LC_ALL or LANG).
>
> Thanks.
> For the record, the bug #700213 describes a problem about that.
>
> [This comment is merged from Bug #872343, which is more or less a
> duplicate.]
>
> --
> You received this bug notification because you are subscribed to
> manpages in Ubuntu.
> Matching subscriptions: mk-manpages
> https://bugs.launchpad.net/bugs/311558
>
> Title:
> $LANG and $LANGUAGE not documented in locale manual page
>
> Status in eglibc package in Ubuntu:
> Triaged
> Status in manpages package in Ubuntu:
> New
>
> Bug description:
> Binary package hint: belocs-locales-bin
>
> 'locale' prints not only the values of LC_*, but also LANG and
> LANGUAGE. These variables should be appropriately documented in the
> manpage.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/311558/+subscriptions

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Revision history for this message
Stéphane Aulery (lkppo) wrote :

Really, I was too tired to do that yesterday. Should we not close the bug and open another one with a title and an appropriate description?

Revision history for this message
Rolf Leggewie (r0lf) wrote :

> In reply to the initial report:
>
> > 'locale' prints not only the values of LC_*, but also LANG and LANGUAGE.
>
> Does it really do this on Ubuntu?

Yes, it does.

$ locale
LANG=de_DE.UTF-8
LANGUAGE="de:en:jp"
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES=C
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

Revision history for this message
Michael Kerrisk (mtk-manpages) wrote :

On 21 February 2016 at 13:56, Rolf Leggewie <email address hidden> wrote:
>> In reply to the initial report:
>>
>> > 'locale' prints not only the values of LC_*, but also LANG and LANGUAGE.
>>
>> Does it really do this on Ubuntu?
>
> Yes, it does.
>
> $ locale
> LANG=de_DE.UTF-8
> LANGUAGE="de:en:jp"
> LC_CTYPE="de_DE.UTF-8"
> LC_NUMERIC=de_DE.UTF-8
> LC_TIME=de_DE.UTF-8
> LC_COLLATE="de_DE.UTF-8"
> LC_MONETARY=de_DE.UTF-8
> LC_MESSAGES=C
> LC_PAPER=de_DE.UTF-8
> LC_NAME=de_DE.UTF-8
> LC_ADDRESS=de_DE.UTF-8
> LC_TELEPHONE=de_DE.UTF-8
> LC_MEASUREMENT=de_DE.UTF-8
> LC_IDENTIFICATION=de_DE.UTF-8
> LC_ALL=

Hmmm -- looking at the glibc sources, locale(1) does not appear to
natively do this. I wonder if this a Debiab/Ubuntu specific patch?

Revision history for this message
Rolf Leggewie (r0lf) wrote :

FWIW, I am running trusty and libc-bin comes from eglibc there but from glibc source packge in later releases. Maybe that can explain the difference. I currently do not have access to a later Ubuntu release to test what the locale command does there.

tags: added: manpage
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.