下面的语言来自生成的AssemblyInfo文件。这是否表示MS建议我手动修改.csproj文件?通过设置?
如果是通过设置,那么NeutralResourcesLanguage属性有什么用?您应该如何通过代码访问它。
干杯,贝里
//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
可以像这样在项目属性中定义此属性(不是设置)
在。Net core项目中,您可以在csproj
中指定它:
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<NeutralLanguage>fr</NeutralLanguage>
</PropertyGroup>
或使用Visual studio
:
Properties
。Package
Assembly neutral language
的值