注意:使用本地址的DXperience 7.3.4http://www.cnblogs.com/fosoyo/archive/2007/12/04/982952.html),否则会出现key不同。

之前我的代码公布到7.1,在网上看到很多所谓最新版的最全的本地化都还是7.1的,然而后续版本增加了很多,比如:XtraRichTextEdit,XtraSpellChecker,XtraScheduler,XtraCharts,XtraPrinting,XtraReports的Ribbon菜单等等,以及WEB的,本来以为Web.ASPxScheduler会在此次的版本官方会加入到资源,可是还是只有小部分,在这里WEB也本地化了。

download



This is for for Visual Studio 2005, 2008

webform:

在项目中加入附件中fosoyo.cnblogs.com.Localization.dll引用

Default.aspx.cs加入:using fosoyo.cnblogs.com.LocalizationCHS;

Default.aspx的Page_Load事件中加入:

fosoyoWebASPxClassesLocalizationCHS WebASPxClassesLocalization = new fosoyoWebASPxClassesLocalizationCHS();
DevExpress.Web.ASPxClasses.Localization.ASPxperienceLocalizer.Active = WebASPxClassesLocalization;

fosoyoWebASPxEditorsLocalizationCHS WebASPxEditorsLocalization = new fosoyoWebASPxEditorsLocalizationCHS();
DevExpress.Web.ASPxEditors.Localization.ASPxEditorsLocalizer.Active = WebASPxEditorsLocalization;

fosoyoWebASPxGridViewLocalizationCHS WebASPxGridViewLocalization = new fosoyoWebASPxGridViewLocalizationCHS();
DevExpress.Web.ASPxGridView.Localization.ASPxGridViewLocalizer.Active = WebASPxGridViewLocalization;

fosoyoWebASPxSchedulerLocalizationCHS WebASPxSchedulerLocalization = new fosoyoWebASPxSchedulerLocalizationCHS();
DevExpress.Web.ASPxScheduler.Localization.ASPxSchedulerLocalizer.Active = WebASPxSchedulerLocalization;






winform:

在项目中加入附件中fosoyo.cnblogs.com.Localization.dll引用

在MDI的MainForm加入:using fosoyo.cnblogs.com.LocalizationCHS;

在MDI MainForm 的FormLoad事件中加入:

fosoyoXtraBarsLocalizationCHS XtraBarsLocalizer = new fosoyoXtraBarsLocalizationCHS();
DevExpress.XtraBars.Localization.BarLocalizer.Active = XtraBarsLocalizer;

fosoyoXtraChartsLocalizationCHS XtraChartsLocalizer = new fosoyoXtraChartsLocalizationCHS();
DevExpress.XtraCharts.Localization.ChartLocalizer.Active = XtraChartsLocalizer;

fosoyoXtraEditorsLocalizationCHS XtraEditorsLocalizer = new fosoyoXtraEditorsLocalizationCHS();
DevExpress.XtraEditors.Controls.Localizer.Active = XtraEditorsLocalizer;

fosoyoXtraGridLocalizationCHS XtraGridLocalizer = new fosoyoXtraGridLocalizationCHS();
DevExpress.XtraGrid.Localization.GridLocalizer.Active = XtraGridLocalizer;

fosoyoXtraLayoutLocalizationCHS XtraLayoutLocalizer = new fosoyoXtraLayoutLocalizationCHS();
DevExpress.XtraLayout.Localization.LayoutLocalizer.Active = XtraLayoutLocalizer;

fosoyoXtraNavBarLocalizationCHS XtraNavBarLocalizer = new fosoyoXtraNavBarLocalizationCHS();
DevExpress.XtraNavBar.NavBarLocalizer.Active = XtraNavBarLocalizer;

fosoyoXtraPivotGridLocalizationCHS XtraPivotGridLocalizer = new fosoyoXtraPivotGridLocalizationCHS();
DevExpress.XtraPivotGrid.Localization.PivotGridLocalizer.Active = XtraPivotGridLocalizer;

fosoyoXtraPrintingLocalizationCHS XtraPrintingLocalizer = new fosoyoXtraPrintingLocalizationCHS();
DevExpress.XtraPrinting.Localization.PreviewLocalizer.Active = XtraPrintingLocalizer;

fosoyoXtraReportsLocalizationCHS XtraReportsLocalizer = new fosoyoXtraReportsLocalizationCHS();
DevExpress.XtraReports.Localization.ReportLocalizer.Active = XtraReportsLocalizer;

fosoyoXtraRichTextEditLocalizationCHS XtraRichTextEditLocalizer = new fosoyoXtraRichTextEditLocalizationCHS();
DevExpress.XtraRichTextEdit.Localization.XtraRichTextEditLocalizer.Active = XtraRichTextEditLocalizer;

fosoyoXtraSchedulerLocalizationCHS XtraSchedulerLocalizer = new fosoyoXtraSchedulerLocalizationCHS();
DevExpress.XtraScheduler.Localization.SchedulerLocalizer.Active = XtraSchedulerLocalizer;

fosoyoXtraSpellCheckerLocalizationCHS XtraSpellCheckerLocalizer = new fosoyoXtraSpellCheckerLocalizationCHS();
DevExpress.XtraSpellChecker.Localization.SpellCheckerLocalizer.Active = XtraSpellCheckerLocalizer;

fosoyoXtraTreeListLocalizationCHS XtraTreeListLocalizer = new fosoyoXtraTreeListLocalizationCHS();
DevExpress.XtraTreeList.Localization.TreeListLocalizer.Active = XtraTreeListLocalizer;

fosoyoXtraVerticalGridLocalizationCHS XtraVerticalGridLocalizer = new fosoyoXtraVerticalGridLocalizationCHS();
DevExpress.XtraVerticalGrid.Localization.VGridLocalizer.Active = XtraVerticalGridLocalizer;
 

注:若在项目中没有用到相关控件,则不需要创建类的实例。例如:没有使用到XtraScheduler控件就不需要

fosoyoXtraSchedulerLocalizationCHS XtraSchedulerLocalizer = new fosoyoXtraSchedulerLocalizationCHS();
DevExpress.XtraScheduler.Localization.SchedulerLocalizer.Active = XtraSchedulerLocalizer;

posted on 2007-12-04 23:41  fosoyo  阅读(3005)  评论(17编辑  收藏  举报