git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: LANGUAGE instead of LANG respected in git?

From
Sergey Organov <sorganov@gmail.com>
Date
Sep 19, 2021, 08:53 UTC
Message-ID
<87pmt5c5g3.fsf@osv.gnss.ru>
In-Reply-To
<8ed06f91-2efc-1816-aa82-beac8e174549@gmail.com>
Bagas Sanjaya <bagasdotme@gmail.com> writes:
Show 10 quoted lines
> Hi,
>
> Supposed that I would like to display `git help` in French
> (`fr_FR.UTF-8`) language. I ran `LANGUAGE="fr_FR.UTF-8" git help`, and
> indeed the help is displayed in French. But when I instead ran
> `LANG="fr_FR.UTF-8" git help`, the help is in English instead of
> French.
>
> It seems like Git use LANGUAGE to display localized messages instead
> of LANG (like many other tools do). Why?

You probably have LC_ALL set in your environment. Neither LANG nor LC_MESSAGES overrides that, while LANGUAGE does.

quote from here:
https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html#Locale-Environment-Variables

"Some systems, unfortunately, set LC_ALL in /etc/profile or in similar initialization files. As a user, you therefore have to unset this variable if you want to set LANG and optionally some of the other LC_xxx variables."

HTH, -- Sergey Organov

Previous: Junio C Hamano
Message 3 of 3 in “LANGUAGE instead of LANG respected in git?”
  1. Bagas SanjayaSep 19, 2021
  2. Junio C HamanoSep 19, 2021
  3. Sergey OrganovSep 19, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.