2011-12-15 80 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

相關問題