VSCode插件开发 获取系统语言环境以及设置语言(中英文)
程序员文章站
2022-04-13 22:45:46
...
如何获取VSCode的语言环境
import * as vscode from 'vscode';
vscode.env.language
VSCode设置语言环境
-
使用快捷键
CTRL + SHIFT + P
,搜索language
,找到Configure Display Language
-
选择所需要设置的语言,然后重启即可,如果没有,选择
Install additional languages...
安装相应语言插件 -
选择所需要安装的插件,然后按要求重启即可
VSCode 语言插件源代码
语言对照表
Language | Visual Studio Code Language ID | MLCP Language Code | Type |
---|---|---|---|
English (United States) | en | US (en) | |
Chinese (Simplified) | zh-cn | Chinese Simplified (zh-cn) | Core |
Chinese (Traditional) | zh-tw | Chinese Traditional (zh-tw) | Core |
French | fr | French (fr-fr) | Core |
Italian | it | Italian (it-it) | Core |
German | de | German (de-de) | Core |
Spanish | es | Spanish (es-es) | Core |
Russian | ru | Russian (ru-ru) | Core |
Japanese | ja | Japanese (ja-jp) | Core |
Korean | ko | Korean (ko-kr) | Core |
Bulgarian | bg | Bulgarian (bg-bg) | Community |
English (United Kingdom) | en-GB | English (en-gb) | Community |
Hungarian | hu | Hungarian (hu-hu) | Community |
Portuguese (Brazil) | pt-br | Portuguese (Brazil) (pt-br) | Community |
Turkish | tr | Turkish (tr-tr) | Community |