DevExpress 14.2 批量汉化 以及客户端的汉化_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > DevExpress 14.2 批量汉化 以及客户端的汉化

DevExpress 14.2 批量汉化 以及客户端的汉化

 2015/5/7 3:14:42  电子灵魂  程序员俱乐部  我要评论(0)
  • 摘要:DXperience汉化方法介绍运用慧都提供的DXperience汉化包,能将最新版本的DXperienceWinForm和ASP.NET控件界面、弹出框、右键菜单等汉化成中文,且能根据自己的需求定制个性化的DXperience本地化。结合汉化文档说明,仅需一行代码就可实现DXperience汉化,至少能节约30%的开发时间!下面就跟大家讲一讲DXperience的汉化方法。怎样汉化DXperienceDXperience汉化方法总结起来,主要有以下几种方式:1、利用已经汉化好的资源包;2
  • 标签:客户 汉化 客户端

 

DXperience汉化方法介绍

运用慧都提供的DXperience汉化包,能将最新版本的DXperience WinForm和ASP.NET控件界面、弹出框、右键菜单等汉化成中文,且能根据自己的需求定制个性化的DXperience本地化。结合汉化文档说明,仅需一行代码就可实现DXperience汉化,至少能节约30%的开发时间!下面就跟大家讲一讲DXperience的汉化方法

怎样汉化DXperience

DXperience汉化方法总结起来,主要有以下几种方式:

1、利用已经汉化好的资源包;
2、使用本地对象类,利用代码汉化;
3、资源包和代码结合。

个人比较喜欢第一种方式,因为这种方法最简单实用。

DXperience汉化包怎么用

首先要先下载DXperience汉化包(DXperience资源包汉化 如需最新版本请联系客服购买,只需少量花费便可节约大量开发成本)。将所需汉化的资源zh-CHS中国 (简体) 、zh-CN中国 (中国)、zh-TW 中国 (台湾)拷贝到执行目录下,利用CurrentThread.CurrentUICulture加载资源包。参照代码如下:

static void Main()
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CHS");
Application.Run(new Form1());
}

如何修改DXperience汉化包

汉化包有一个跟DXperience控件同样的强名密钥文件StrongKey.snk。如果想编译资源文件,只要你有控件完整的源代码,重新指定强名密钥文件,获得自己的StrongKey.snk。具体实现可查阅MSDN Library。

拷贝StrongKey.snk从安装的源代码的目录"Program Files"Developer Express .NET vX.Y"Sources"DevExpress.Key" 到当前资源包的DevExpress.Key目录。(vX.Y为当前安装版本号)

打开资源包Localization.sln工程,根据下面提及的使用本地化方法找出要汉化的属性,当然如果你购买了源代码也可以查看源代码Localization类里面的本地化方法列出的变量来实现你需要的汉化。

重新生成资源文件,这时对应的Dll将在DevExpress.DLL文件夹中。

DXperience WebForm(ASPxControls)汉化效果图

DXperience,DXperience WebForm,ASPxControls,DXperience汉化

DXperience WinForm汉化效果图

DXperience WinForm,WinForm汉化,DXperience汉化

汉化部分控件的方法

1、下载DevExpress_.NET_Localization_Resources_14.2汉化包

2、解压后将zh-CN或zh-CHS复制到安装目录如D:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework

3、在开始菜中找到Visual Studio 命令提示(2010),并以管理员身份运行(WIN7,8)

4、切换命令行当前目录到D:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\zh-CN

5、运行dir /B *.dll >>temp.bat,在当前目录中得到所有dll列表

6、用记事本打开D:\Program Files (x86)\DevExpress 14.2\Components\Bin\Framework\zh-CN\temp.bat

7、通过替换功能将 DevExpress.Charts.Designer.v14.2.resources.dll 处理成 gacutil -i DevExpress.Charts.Designer.v14.2.resources.dll

8、保存temp.bat

9、在命令行窗口中输入temp.bat

10、汉化完成,删除临时文件temp.bat

PS: 不通过 Visual Studio 命令提示(2010) 执行会提示 :'gacutil' 不是内部或外部命令,也不是可运行的程序或批处理文件。

处理好的文件列表

gacutil -i DevExpress.Charts.Designer.v14.2.resources.dll
gacutil -i DevExpress.Dashboard.v14.2.Core.resources.dll
gacutil -i DevExpress.Dashboard.v14.2.Web.resources.dll
gacutil -i DevExpress.Dashboard.v14.2.Win.resources.dll
gacutil -i DevExpress.Data.v14.2.resources.dll
gacutil -i DevExpress.DataAccess.v14.2.resources.dll
gacutil -i DevExpress.DataAccess.v14.2.UI.resources.dll
gacutil -i DevExpress.ExpressApp.HtmlPropertyEditor.Win.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.PivotChart.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.Reports.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.Scheduler.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.Scheduler.Web.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.Security.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.Validation.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.Web.v14.2.resources.dll
gacutil -i DevExpress.ExpressApp.Win.v14.2.resources.dll
gacutil -i DevExpress.Map.v14.2.Core.resources.dll
gacutil -i DevExpress.Office.v14.2.Core.resources.dll
gacutil -i DevExpress.Pdf.v14.2.Core.resources.dll
gacutil -i DevExpress.PivotGrid.v14.2.Core.resources.dll
gacutil -i DevExpress.Printing.v14.2.Core.resources.dll
gacutil -i DevExpress.RichEdit.v14.2.Core.resources.dll
gacutil -i DevExpress.Snap.v14.2.Core.resources.dll
gacutil -i DevExpress.Snap.v14.2.Extensions.resources.dll
gacutil -i DevExpress.Snap.v14.2.resources.dll
gacutil -i DevExpress.Sparkline.v14.2.Core.resources.dll
gacutil -i DevExpress.Spreadsheet.v14.2.Core.resources.dll
gacutil -i DevExpress.Utils.v14.2.resources.dll
gacutil -i DevExpress.Utils.v14.2.UI.resources.dll
gacutil -i DevExpress.Web.ASPxHtmlEditor.v14.2.resources.dll
gacutil -i DevExpress.Web.ASPxRichEdit.v14.2.resources.dll
gacutil -i DevExpress.Web.ASPxScheduler.v14.2.resources.dll
gacutil -i DevExpress.Web.ASPxSpellChecker.v14.2.resources.dll
gacutil -i DevExpress.Web.ASPxSpreadsheet.v14.2.resources.dll
gacutil -i DevExpress.Web.ASPxTreeList.v14.2.resources.dll
gacutil -i DevExpress.Web.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Charts.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Controls.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Core.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Docking.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Gauges.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Grid.v14.2.Core.resources.dll
gacutil -i DevExpress.Xpf.LayoutControl.v14.2.resources.dll
gacutil -i DevExpress.Xpf.NavBar.v14.2.resources.dll
gacutil -i DevExpress.Xpf.PdfViewer.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Printing.v14.2.resources.dll
gacutil -i DevExpress.Xpf.PropertyGrid.v14.2.resources.dll
gacutil -i DevExpress.Xpf.ReportDesigner.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Ribbon.v14.2.resources.dll
gacutil -i DevExpress.Xpf.RichEdit.v14.2.resources.dll
gacutil -i DevExpress.Xpf.Scheduler.v14.2.resources.dll
gacutil -i DevExpress.Xpf.SpellChecker.v14.2.resources.dll
gacutil -i DevExpress.Xpo.v14.2.resources.dll
gacutil -i DevExpress.XtraBars.v14.2.resources.dll
gacutil -i DevExpress.XtraCharts.v14.2.resources.dll
gacutil -i DevExpress.XtraCharts.v14.2.Wizard.resources.dll
gacutil -i DevExpress.XtraEditors.v14.2.resources.dll
gacutil -i DevExpress.XtraGauges.v14.2.Core.resources.dll
gacutil -i DevExpress.XtraGauges.v14.2.Presets.resources.dll
gacutil -i DevExpress.XtraGrid.v14.2.resources.dll
gacutil -i DevExpress.XtraLayout.v14.2.resources.dll
gacutil -i DevExpress.XtraNavBar.v14.2.resources.dll
gacutil -i DevExpress.XtraPdfViewer.v14.2.resources.dll
gacutil -i DevExpress.XtraPivotGrid.v14.2.resources.dll
gacutil -i DevExpress.XtraPrinting.v14.2.resources.dll
gacutil -i DevExpress.XtraReports.v14.2.Extensions.resources.dll
gacutil -i DevExpress.XtraReports.v14.2.resources.dll
gacutil -i DevExpress.XtraReports.v14.2.Web.resources.dll
gacutil -i DevExpress.XtraRichEdit.v14.2.Extensions.resources.dll
gacutil -i DevExpress.XtraRichEdit.v14.2.resources.dll
gacutil -i DevExpress.XtraScheduler.v14.2.Core.resources.dll
gacutil -i DevExpress.XtraScheduler.v14.2.Extensions.resources.dll
gacutil -i DevExpress.XtraScheduler.v14.2.Reporting.resources.dll
gacutil -i DevExpress.XtraScheduler.v14.2.resources.dll
gacutil -i DevExpress.XtraSpellChecker.v14.2.resources.dll
gacutil -i DevExpress.XtraSpreadsheet.v14.2.resources.dll
gacutil -i DevExpress.XtraTreeList.v14.2.resources.dll
gacutil -i DevExpress.XtraVerticalGrid.v14.2.resources.dll
gacutil -i DevExpress.XtraWizard.v14.2.resources.dll
上一篇: 02C#基础(1) 下一篇: java处理PDF的插件
发表评论
用户名: 匿名