Homebrew and Git – Wrong language on the command line

command linelanguage

I have a strange issue – when I use the git command which comes with the Command Line Tools package, the interface on the command-line is in English, as I want it to be. However, the version installed using Homebrew uses German in its output (I live in Germany, but my system language is set to US English and the computer was actually bought in Singapore, if it matters).

I believe this changed only recently. I had to give my Mac for repair and did so in a German store. Now that I have my computer back I noticed that Git's output is in German, not sure if they did anything to the system settings while they had it. As far as I know, this is the only command-line application that uses German as its language. Here is the output generated by the locale command:

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

I would like to have Git talk to me in English. I know I can set the LANG etc. to English and it would (probably) work, but I would also like to understand where this change may be coming from.

Any ideas?

EDIT: to make things more interesting, I use another Mac that I got from work. It was bought in Germany, the initial language settings were German (which I changed to US English) and everything works fine on it, i.e. both Git installations (CLT and Homebrew) use English. Locale information from the locale command is the same.

Best Answer

Recently, I've started to observe the same behavior, particularly with git (and after updating to MacOS Mojave). At first, I thought it's an issue with git itself. So, I've reinstalled git with homebrew to no avail.

However, going to "Language & Region" tab in the MacOS "Settings", and removing other languages from the list that you don't need (note: these are different from the keyboard input sources) resulted in git displaying the command output messages in terminal in the desired language (in my case, English).

Notably, this problem occurred to me only in the macOS terminal (and not, e.g., VSCode's terminal).