简体   繁体   English

如何将 Visual Studio Code Terminal output 设置为英文

[英]How to set Visual Studio Code Terminal output to English

My environment is:我的环境是:

  • Visual Studio Code: English Visual Studio 代码:英语
  • Windows 10: Japanese Windows 10:日语

When I try to use Terminal to add package, it output messages in Japanese.当我尝试使用终端添加 package 时,它会在日语中显示 output 消息。
But I would like it to output them in English.但我想把它用英文写成 output 他们。

终端输出

在此处输入图像描述

For Windows对于 Windows

  1. go to visual studio code转到Visual Studio 代码
  2. Press Ctrl+Shift+P to bring up the Command Palette then start typing "display" to filter and display the Configure Display Language command.按 Ctrl+Shift+P 调出命令面板,然后开始键入“display”以过滤和显示配置显示语言命令。
  3. open local.json file打开local.json文件
  4. You can use IntelliSense (Ctrl+Space) to select a different supported language locale.您可以使用 IntelliSense (Ctrl+Space) 选择不同的受支持语言区域设置。
  5. Change to en更改为en
  6. Restart Visual Studio Code重新启动Visual Studio 代码

For ubuntu / Linux对于 ubuntu/Linux

Edit two files:编辑两个文件:

sudoedit /etc/default/locale: sudoedit /etc/default/locale:

LANG="en_US" LANG="zh_CN"

LANGUAGE="en_US:en" LANGUAGE="en_US:en"

sudoedit ~/.pam_environment: sudoedit ~/.pam_environment:

LANG=en_US LANG=en_US

LANGUAGE=en_US LANGUAGE=zh_CN

Logout and Login or Reboot.注销并登录或重新启动。

I have found the solution.我找到了解决办法。 Because the terminal is using powershell, so we should set the powershell's output.因为终端使用的是powershell,所以我们应该设置powershell的输出。 here it is: 1. execute the command "set-culture -cultureinfo en-US" in terminal 2. restart vscode 3. execute "get-culture" in terminal,confirm the output just like this:这里是: 1. 在终端中执行命令“set-culture -cultureinfo en-US” 2. 重新启动 vscode 3. 在终端中执行“get-culture”,确认输出如下:

LCID Name DisplayName ---- ---- ----------- 1033 en-US 英語 (米国) LCID 名称 DisplayName ---- ---- ----------- 1033 en-US English (China)

I'm on linux but having the same problem.我在 linux 上,但有同样的问题。

What works for me is to check terminal > integrated: inherit env in vscode.对我有用的是检查terminal > integrated: inherit env在 vscode 中terminal > integrated: inherit env

I had the same issue.我遇到过同样的问题。 I found the solution here https://github.com/dotnet/sdk/issues/8686我在这里找到了解决方案https://github.com/dotnet/sdk/issues/8686

It was fixed by setting the environmental variable "DOTNET_CLI_UI_LANGUAGE" to "en"通过将环境变量“DOTNET_CLI_UI_LANGUAGE”设置为“en”来修复它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM