在运行时更改语言 [英] Changing Language at runtime
本文介绍了在运行时更改语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好;
您能否让我知道如何在运行时更改语言栏?
非常感谢
解决方案
请参见此处 [ ^ ].
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
或
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
或
Application.CurrentCulture = new System.Globalization.CultureInfo("en-US");
或使用语言代码代替"en-US"字符串
Hi:
下面的代码运行良好:
System.Globalization.CultureInfo Persian = new System.Globalization.CultureInfo("fa-IR"); InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(Persian);
这里有丰富的文化名称列表: http://msdn.microsoft.com/zh-CN/library/ms866170.aspx
Hello;
Could you please let me know how I can change the Language of Language bar at runtime?
Thanks a lot
解决方案
See here[^].
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
or
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
or
Application.CurrentCulture = new System.Globalization.CultureInfo("en-US");
or use language code instead of "en-US" string
Hi:
The code below works well:
System.Globalization.CultureInfo Persian = new System.Globalization.CultureInfo("fa-IR"); InputLanguage.CurrentInputLanguage = InputLanguage.FromCulture(Persian);
There is a rich list of Culture Name here : http://msdn.microsoft.com/en-us/library/ms866170.aspx
这篇关于在运行时更改语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文