hg: How do I change the language of my Mercurial(hg) installation? (MacOS)
Asked Answered
A

4

20

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?

Azpurua answered 4/1, 2011 at 10:39 Comment(0)
T
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
Trichina answered 10/1, 2011 at 19:9 Comment(0)
S
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!

Swartz answered 25/11, 2014 at 14:27 Comment(2)
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.Premise
Dirty yes, but a 5 second solution that works perfectly. Thanks!Aldwon
F
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.

Felicidad answered 4/1, 2011 at 11:5 Comment(2)
I don't know how to change the value of environment variables on Mac, In Linux it would be: export LANG=CFelicidad
It's definitely the LANGUAGE variable.Griffin
Y
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.

Yarn answered 10/11, 2018 at 17:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.