I re-installed mercurial on my Mac (snow leopard) yesterday. The UI/console language of Mercurial has changed from English to Danish. My machine is set up to US-English and my keyboard layout is Danish. I do not want the Danish translation active as it is incomplete.
I just need Mercurial to "speak" English again. :-) How do i change this?
If you set your LANG environment variable to en_US.UTF-8 your can change the language of the Mercurial client (Hg).
export LANG=en_US.UTF-8
If you don't want to change your environment variables (as this might influence other applications you actually want to speak in your native language), you can also just rename the locale specific subdirectory (e.g. <mercurial_install_dir>/locacle/de
) to something else, in which case mercurial will fall back to the default English. I admit it's a bit dirty, but I've used this trick also for other applications where the translation was crappy and the app did not allow to set the desired language explicitly!
Language is determined by the LANG, LC_ALL and LANGUAGE environment variables. And you can set the locale to the C locale to get English, since this is the default.
Setting an alias which temporarily clears the LANG
and LANGUAGE
environment variables before calling the hg
command does it for me:
$ alias hg='LANG="" LANGUAGE="" hg'
You can add this to your ~/.bash_aliases
.
来源:https://stackoverflow.com/questions/4592664/hg-how-do-i-change-the-language-of-my-mercurialhg-installation-macos