2009-12-14 168 views

回答

1

我發現的最簡單的例子: Windows Mobile Globalization in Visual Studio 除了在ReloadForm方法中,不需要移除和處理控件,只需要改變翻譯和位置即可。實際上,這個示例不僅適用於translaten,而且適用於解決方案感知處理,因爲如果您已添加到resx文件中,它將翻譯和位置更改。

private void SetCaptions() 
    { 
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); 
     this.SuspendLayout(); 
     for (int i = 0; i != Controls.Count; i++) 
     { 
      //controls[i].Dispose(); 
      resources.ApplyResources(Controls[i], Controls[i].Name, Program.Culture); 

     } 
     resources.ApplyResources(this, "$this", Program.Culture); 
     this.ResumeLayout(false); 
    } 

我定製,對於我的項目,讓我知道如果您有任何問題或更好的解決方案,謝謝。

-1

System.Globalization.CultureInfo.CurrentCulture。*應該幫助...

1

System.Globalization.CultureInfo.CurrentCultureSystem.Globalization.CultureInfo.CurrentUICulture不能以編程方式設置爲唯一廠家能做到這一點。您需要更改區域設置並重置設備。