{"thread":{"id":"56537","subject":"LANGUAGE instead of LANG respected in git?","startedAt":"2021-09-19T05:04:10Z","lastAt":"2021-09-19T08:53:07Z","messageCount":3,"participants":["Bagas Sanjaya","Junio C Hamano","Sergey Organov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"436349","messageId":"8ed06f91-2efc-1816-aa82-beac8e174549@gmail.com","threadId":"56537","inReplyTo":null,"subject":"LANGUAGE instead of LANG respected in git?","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-09-19T05:04:04Z","receivedAt":"2021-09-19T05:04:10Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"Hi,\n\nSupposed that I would like to display `git help` in French \n(`fr_FR.UTF-8`) language. I ran `LANGUAGE=\"fr_FR.UTF-8\" git help`, and \nindeed the help is displayed in French. But when I instead ran \n`LANG=\"fr_FR.UTF-8\" git help`, the help is in English instead of French.\n\nIt seems like Git use LANGUAGE to display localized messages instead of \nLANG (like many other tools do). Why?\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"436351","messageId":"xmqq7dfdf3ft.fsf@gitster.g","threadId":"56537","inReplyTo":"8ed06f91-2efc-1816-aa82-beac8e174549@gmail.com","subject":"Re: LANGUAGE instead of LANG respected in git?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-09-19T07:08:06Z","receivedAt":"2021-09-19T07:10:51Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Bagas Sanjaya <bagasdotme@gmail.com> writes:\n\n> Supposed that I would like to display `git help` in French\n> (`fr_FR.UTF-8`) language. I ran `LANGUAGE=\"fr_FR.UTF-8\" git help`, and \n> indeed the help is displayed in French. But when I instead ran\n> `LANG=\"fr_FR.UTF-8\" git help`, the help is in English instead of\n> French.\n>\n> It seems like Git use LANGUAGE to display localized messages instead\n> of LANG (like many other tools do). Why?\n\nThat's not Git but your system, most likely GNU gettext, is doing.\n\nLearn to use your search engine before asking questions here.\n\n  https://bfy.tw/Rg6H\n\nwhich will eventually take you to https://superuser.com/a/392466\n"},{"id":"436363","messageId":"87pmt5c5g3.fsf@osv.gnss.ru","threadId":"56537","inReplyTo":"8ed06f91-2efc-1816-aa82-beac8e174549@gmail.com","subject":"Re: LANGUAGE instead of LANG respected in git?","fromName":"Sergey Organov","fromEmail":"sorganov@gmail.com","sentAt":"2021-09-19T08:53:00Z","receivedAt":"2021-09-19T08:53:07Z","isPatch":false,"sender":{"key":"sorganov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8501568?v=4"},"body":"Bagas Sanjaya <bagasdotme@gmail.com> writes:\n\n> Hi,\n>\n> Supposed that I would like to display `git help` in French\n> (`fr_FR.UTF-8`) language. I ran `LANGUAGE=\"fr_FR.UTF-8\" git help`, and\n> indeed the help is displayed in French. But when I instead ran\n> `LANG=\"fr_FR.UTF-8\" git help`, the help is in English instead of\n> French.\n>\n> It seems like Git use LANGUAGE to display localized messages instead\n> of LANG (like many other tools do). Why?\n\nYou probably have LC_ALL set in your environment. Neither LANG nor\nLC_MESSAGES overrides that, while LANGUAGE does.\n\nquote from here:\n\nhttps://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html#Locale-Environment-Variables\n\n\"Some systems, unfortunately, set LC_ALL in /etc/profile or in similar\ninitialization files. As a user, you therefore have to unset this\nvariable if you want to set LANG and optionally some of the other LC_xxx\nvariables.\"\n\nHTH,\n-- Sergey Organov\n"}]}