| 把把解压出来的资源文件文件,如zh-Hans等放到您应用程序的bin目录下。 然后再您应用程序代码的Main中加入以下代码即可 static void Main() { // The following line provides localization for the application's user interface. System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-Hans"); // The following line provides localization for data formats. System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("zh-Hans"); // Note that the above code should be added BEFORE calling the Run() method. Application.Run(new Form1()); } |


本文详细介绍了如何在C#应用程序中实现国际化,通过将资源文件如zh-Hans放入bin目录,并在Main方法中设置当前线程的UI文化和默认文化为简体中文,使应用程序能够支持多语言。
6603

被折叠的 条评论
为什么被折叠?



