Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to permanently change the language of mercurial command line on Windows?

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.

like image 402
James Avatar asked Feb 11 '13 08:02

James


People also ask

How to check Mercurial is installed or not?

To check, enter hg --version at the command line. Depending on your operating system: For Windows: Download the Mercurial installer.

What is hg in terminal?

The hg command provides a command line interface to the Mercurial system.

What does hg update do?

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).


2 Answers

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.

like image 195
mvp Avatar answered Sep 28 '22 00:09

mvp


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

like image 37
jaxxon Avatar answered Sep 27 '22 23:09

jaxxon