How to constantly change the command line language in Microsoft?

How can I change the mercurial command-line language to English on Windows? Setting the LANG environment variable as described in this answer helps temporarily for a single command window, but can the language be set somehow in mercurial.ini (or hgrc) or somehow?

The reason for this: the German mercurial output is broken in such a way that all special characters (Umlaute, etc.) are not displayed correctly.

+6
source share
3 answers

You can set the LANGUAGE environment variable to en_US.UTF-8 either for the current user or globally using Control PanelAll Control Panel ItemsSystemAdvanced system settingsAdvancedEnvironment variables , create a new variable in User or System .

Once created, your changes will only apply to new instances of cmd or other programs.

Note that LANGUAGE env seems to be. a variable is not something that most other programs pay attention to, with the exception of hg or TortoiseHg . I was able to install it in my Windows 7 window (English) and set LANGUAGE=de_DE.UTF-8 . This changed hg to report most messages in German, but it didn’t affect any of my programs - they still speak English.

+9
source

If you want to change your command-line language to English, go to your mercury installation path (for example, in windows C:\Program Files\Mercurial\ ), then /locale/ and rename the wrong folder of the current language (for example, de) to _de.

Now hg will revert to the default language en

+6
source

I assume that you used SET to set the environment variable. This will only change the variable for the lifetime of the current command window.

Have you tried constantly changing the LANG environment variable using SETX ? This changes the variable constantly. However, note that it will not change the current command window, so you will need to open a new command window to see the effect of the change.

0
source

All Articles