2009-01-29 34 views
1

使用locbaml方法,我創建了一個新的資源dll,並試圖以編程方式更改CurrentCulture和CurrentUICulture,但它似乎沒有工作。使用locbaml方法在運行時更改CurrentUICulture

System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("ar-SA"); 
System.Threading.Thread.CurrentThread.CurrentUICulture = ci; 
System.Threading.Thread.CurrentThread.CurrentCulture = ci; 

我是否缺少明顯的東西?

回答

1

據我所知,使用'locbaml'metod無法實時切換語言,因此如果需要,在顯示任何UI之前必須正確設置當前[UI]文化。

+0

我也想知道爲什麼我不能在飛行中改變它的原因。 – Gqqnbig 2013-02-04 04:05:41