How can I change the language of the mercurial command line permanently to english on Windows? Setting the LANG environment variable as described in this answer helps temporarily for one command window, but can the language be set somehow in mercurial.ini (or hgrc) or somehow else?
The reason behind this: the German output of mercurial is broken in a way that all special characters (Umlaute etc.) are not displayed correctly.
To check, enter hg --version at the command line. Depending on your operating system: For Windows: Download the Mercurial installer.
The hg command provides a command line interface to the Mercurial system.
Description. Update the repository's working directory to the specified changeset. If no changeset is specified, update to the tip of the current named branch and move the active bookmark (see hg help bookmarks). Update sets the working directory's parent revision to the specified changeset (see hg help parents).
You can set LANGUAGE
environment variable to en_US.UTF-8
either for current user or globally using Control Panel
-> All Control Panel Items
-> System
-> Advanced system settings
-> Advanced
-> Environment variables
, create new variable in User
or System
.
After creating it, your changes will only apply for new instances of cmd
or other programs.
Note, that it seems that LANGUAGE
env. variable is not something that most other programs pay any attention to, except for hg
or TortoiseHg
. I was able to install it in my Windows 7 box (English) and set LANGUAGE=de_DE.UTF-8
. This has changed hg
to report most messages in German, but it did not affect any other of my programs - they still speak English.
If you want to change your command line language to english, go to your mercurial installation path (e.g. on windows C:\Program Files\Mercurial\
) then /locale/
and rename the wrong current language folder (e.g. de) to _de.
Now hg will fall back to the default language en
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With