前提:已经安装DevExpress14.1
从DevExpressLocalizedResources_2014.1_all 中找到DevExpressLocalizedResources_2014.1_zh-Hans.zip,复制到程序生成目录,如下图(Debug或Release)
如果是vb.net在代码中添加:
折叠ASP/Visual Basic Code复制内容到剪贴板
- System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("zh-Hans")
- System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo("zh-Hans")
注意:zh-Hans必须与文件夹名对应
C#则添加如下代码
折叠C# Code复制内容到剪贴板
- 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());
- }