为 .NET 8 安装本地化的 IntelliSense 文件

微软教程官网网站:https://learn.microsoft.com/zh-cn/dotnet/core/install/localized-intellisense

img

img

img

在官方提供的本地化 IntelliSense 文件下载页面上,可以看到目前仅提供了.NET5 的本地化 IntelliSense 文件。我们要下载的是.NET8的本地化IntelliSense文件,这时官网的下载页面满足不了我们的需求,我们可以打开github的IntelliSense开源项目,里面提供了.NET的本地化IntelliSense工具,使用它来对我们的 .NET8 的 IntelliSense 文件进行本地化。

github项目链接:https://github.com/stratosblue/IntelliSenseLocalizer?tab=readme-ov-file

img

使用教程:

1.安装IntelliSenseLocalizer工具,打开cmd命令提示符窗口输入下面命令进行自动安装(不需要下载github项目内容)

dotnet tool install -g islocalizer

2.下载完后,在cmd命令提示符窗口使用工具自动安装本地化的.NET8本地化IntelliSense 文件

OriginFirst原始内容在前(英文在前,中文在后)

LocaleFirst本地化内容在前(中文在前,英文在后)

None没有对照(仅含中文)

这里我们使用OriginFirst原始内容在前

islocalizer install auto -m net8.0 -l zh-cn -cc OriginFirst

3.如果要给.NET6进行本地化IntelliSense 文件安装

islocalizer install auto -m net6.0 -l zh-cn -cc OriginFirst

安装完成之后,打开Visual Studio,就可以看到本地化效果了:img

img

posted @ 2024-04-12 09:53  好大的鱼  阅读(2142)  评论(9)    收藏  举报