# LANGUAGE instead of LANG respected in git?

3 messages from 2021-09-19 to 2021-09-19. Participants: Bagas Sanjaya, Junio C Hamano, Sergey Organov.
Thread: https://gitlist.dev/t/56537

## Bagas Sanjaya, 2021-09-19 05:04

Subject: LANGUAGE instead of LANG respected in git?
Message-ID: <8ed06f91-2efc-1816-aa82-beac8e174549@gmail.com>
URL: https://gitlist.dev/e/8ed06f91-2efc-1816-aa82-beac8e174549%40gmail.com

```
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?

-- 
An old man doll... just what I always wanted! - Clara

```

## Junio C Hamano, 2021-09-19 07:08

Subject: Re: LANGUAGE instead of LANG respected in git?
Message-ID: <xmqq7dfdf3ft.fsf@gitster.g>
URL: https://gitlist.dev/e/xmqq7dfdf3ft.fsf%40gitster.g
In-Reply-To: <8ed06f91-2efc-1816-aa82-beac8e174549@gmail.com>

```
Bagas Sanjaya <bagasdotme@gmail.com> writes:

> 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?

That's not Git but your system, most likely GNU gettext, is doing.

Learn to use your search engine before asking questions here.

  https://bfy.tw/Rg6H

which will eventually take you to https://superuser.com/a/392466

```

## Sergey Organov, 2021-09-19 08:53

Subject: Re: LANGUAGE instead of LANG respected in git?
Message-ID: <87pmt5c5g3.fsf@osv.gnss.ru>
URL: https://gitlist.dev/e/87pmt5c5g3.fsf%40osv.gnss.ru
In-Reply-To: <8ed06f91-2efc-1816-aa82-beac8e174549@gmail.com>

```
Bagas Sanjaya <bagasdotme@gmail.com> writes:

> 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

```
