LANGUAGE instead of LANG respected in git?
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?
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 8 lines · Bagas Sanjaya
Supposed that I would like to display
git helpin French (fr_FR.UTF-8) language. I ranLANGUAGE="fr_FR.UTF-8" git help, and indeed the help is displayed in French. But when I instead ranLANG="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.
which will eventually take you to https://superuser.com/a/392466
Quoted 10 lines · Bagas Sanjaya
Hi,
Supposed that I would like to display
git helpin French (fr_FR.UTF-8) language. I ranLANGUAGE="fr_FR.UTF-8" git help, and indeed the help is displayed in French. But when I instead ranLANG="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:
"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