21

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?

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229

4 Answers4

17

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
Emil Rasmussen
  • 653
  • 1
  • 5
  • 19
10

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!

Till Kuhn
  • 1,054
  • 11
  • 17
  • This is the best solution for me. Changing your LANG env var just for mercurial is not something I'd recommend. Instead mercurial should had an option in mercurial.ini to change the default language -- since it doesn't, deleting the not-needed language from the locale folder is the next best thing. – Serafeim Sep 10 '15 at 08:06
  • Dirty yes, but a 5 second solution that works perfectly. Thanks! – citronas Nov 02 '15 at 15:53
1

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.

0

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.

Murphy
  • 3,827
  • 4
  • 21
  • 35