2011-12-15 78 views
4

下面的代码来自生成的AssemblyInfo文件。这是否意味着MS建议我手工修改.csproj文件?通过环境?NeutralResourcesLanguage Usage

如果是通过设置,那么NeutralResourcesLanguage属性有什么用处?你应该如何在代码中访问它。

干杯,
Berryl

//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)] 

回答

7

该属性(不设置)可在项目属性进行定义,像这样

  1. 在解决方案资源管理器中,右键单击您的项目,然后点击属性。
  2. 从左侧导航栏中选择应用程序,然后单击装配信息。
  3. 在Assembly Information对话框中,从Neutral Language下拉列表中选择语言。
  4. 单击确定。
+0

谢谢,但VS Express不添加**,UltimateResourceFallbackLocation.Satellite **。所以你必须打开AssemblyInfo.cs并手动添加突出显示的文本 – Dmitriy 2012-02-02 15:13:40

相关问题