使用locbaml方法,我创建了一个新的资源dll,并尝试以编程方式动态更改CurrentCulture和CurrentUICulture,但它似乎不起作用。
System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("ar-SA");
System.Threading.Thread.CurrentThread.CurrentUICulture = ci;
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
我错过了一些明显的东西吗?
答案 0 :(得分:1)
据我所知,使用'locbaml'metod你无法动态切换语言,因此在显示任何UI之前,你必须在需要时适当地设置Current [UI] Culture。