Force dotnet CLI in English on a French Windows
Asked Answered
D

8

20

I'm French, and like to have the Windows UI in French, but all my dev tools in English.

The dotnet CLI tool displays its output in French, and I'd like to force it to English. Is it possible?

Discrete answered 7/5, 2018 at 15:1 Comment(0)
F
21

You can use the DOTNET_CLI_UI_LANGUAGE environment variable to override the language used by the dotnetCLI:

> set DOTNET_CLI_UI_LANGUAGE=en
> dotnet --help
…
[english content]
Forensics answered 7/5, 2018 at 15:38 Comment(3)
This does not seem to work (any more). Tested under dotnet 3.1.201 Windows 10 Version 1903 Build 18362.720Ictinus
so much searching and this is so easy, thanksCelestyn
It works with .NET 6 (preview 7) with CMD use set DOTNET_CLI_UI_LANGUAGE=en with PS use $Env:DOTNET_CLI_UI_LANGUAGE = "en"Pity
C
14

To set DOTNET_CLI_UI_LANGUAGE environment variable please use:

  • DOTNET_CLI_UI_LANGUAGE=en in cmd.exe
  • $Env:DOTNET_CLI_UI_LANGUAGE = "en" in PowerShell
Coniology answered 25/7, 2021 at 8:36 Comment(0)
P
11

For unix-like system (Mac OS X, Linux)

set DOTNET_CLI_UI_LANGUAGE=en

dotnet --help

For Windows

  1. setx DOTNET_CLI_UI_LANGUAGE en
  1. Goto "dotnet-install-directory\sdk\sdk-version" (For example C:\Program Files\dotnet\sdk\3.1.102 in windows for dotnet version 3.1.102)
  1. Delete folder of your language for example, delete fr because your dotnet show French. delete zh-Hans and zh-Hant if your dotnet show Chinese.
Platto answered 15/7, 2020 at 3:46 Comment(1)
For Windows: Step #4 - Open a new terminal.Untoward
T
3

Worked for RU-language too.
setx DOTNET_CLI_UI_LANGUAGE en - partially change the cli language.
And delete or rename folder of your language in "dotnet-install-directory\sdk\sdk-version" that you can get via dotnet --info - changes finally the language to English.

Thyroxine answered 5/8, 2021 at 22:20 Comment(1)
deleting the folder of my language finally made the change.Margertmargery
B
2

Previous answers didn't work for me on MacOS with zsh.

What worked was

export DOTNET_CLI_UI_LANGUAGE=en

but it's not enough, because as soon as you close your terminal this variable will be lost, so I had to add it to ~/.zshrc.

Brass answered 16/8, 2023 at 12:39 Comment(0)
F
1

I tried to Martin's answer,but it did not work

After that, i tried followings, it needs to work

  1. Run the command setx DOTNET_CLI_UI_LANGUAGE en
  2. Go to location where dotnet is installed Go to
  3. "dotnet-install-directory\sdk\sdk-version" (For example C:\Program Files\dotnet\sdk\3.1.102 in windows for dotnet version 3.1.102)
  4. Delete folder zh-Hans and zh-Hant
Flivver answered 11/7, 2020 at 13:43 Comment(0)
D
0

on windows using bash

export DOTNET_CLI_UI_LANGUAGE=en

you can run this command every time or add the command to ~/.bashrc file

Dorkus answered 21/3, 2024 at 12:19 Comment(0)
F
0

As said, we need to change the DOTNET_CLI_UI_LANGUAGE environment variable to the desired language (en in this case).


My setup is Windows + .NET 8.0.303 + Git Bash, this worked for me:
# Open Git Bash
cd            # go to home directory (e.g C:\Users\your_windows_user)
code .bashrc  # open a file (and create if it doesn't exit) called .bashrc in VSCode

Now we put export DOTNET_CLI_UI_LANGUAGE=en inside C:\Users\your_windows_user\.bashrc to permanently change the value of the environment variable DOTNET_CLI_UI_LANGUAGE.


**TL;DR: JUST INSTALL WINDOWS/LINUX/... IN ENGLISH AND AVOID THE UNNECESSARY HEADACHE.**

Edit (some days later, still learning C#, this is a tip for other noobs like me): reinstall your windows in English (be careful with special symbols or accents that may exist in your native language but not in English if you use your PC to write in your mother tongue, configure it correctly and you will probably have no problem). I haven't been able to do this yet, I changed the language but the installations were already done in my mother tongue. in other words, the errors for Npsql (library for C# to allow connection to postgresql) remain in my native language even though I changed the Windows language to English and .NET to English as well.
[Ignore this if you have the patience to change the language of everything related to programming on your PC]
Fluted answered 4/8, 2024 at 15:56 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.