How does git choose its language?

#1

There are two questions on stackoverflow about a brew installed git changing its language (in one case to french, in the other to russian):


In both cases the LANG environment variables are not set. Why is this so? Why isn’t the default language english?

0 Likes

(Sean Molenaar) #2

The default language is the system language. It won’t know to target English until you tell it to.

0 Likes

#3

Well, the system language IS English in my case. As far as I know, there is nothing French or Russian on my system. So the question remains, why does git choose French or Russian?

0 Likes

(Sean Molenaar) #4

That seems more like a question for the git forum. As far as I know it depends on the LANG variable that is set by the system.

0 Likes

(Maarten) #5

It’s definitely a git issue (finally figured it out myself). There is also literally 0 information on this. The “bug” that happens is that it takes your country setting (somehow) since apple does not set the LANG variable by default.

Solution:
Add the folowing code to your ~/.bash_profile (or wherever you have your environment variables):

export LANG=en_US.UTF-8

or, depending your preference:

export LANG=en_UK.UTF-8
0 Likes