DEVEXPREESS组件的本地化

XtraEditors的汉化,
C#:
using DevExpress.XtraEditors.Controls;
 
// creating the Localizer descendant
public class Editzhcn : Localizer {
    // overriding the GetLocalizedString method
    public override string GetLocalizedString(StringId id)
    {
        switch (id)
      {
            case StringId.None:
            {
                  return "";
            }
            case StringId.CaptionError:
            {
                  return "错误";
            }
            case StringId.InvalidValueText:
            {
                  return "非法值";
            }
            case StringId.CheckChecked:
            {
                  return "选中";
            }
            case StringId.CheckUnchecked:
            {
                  return "未选中";
            }
            case StringId.CheckIndeterminate:
            {
                  return "Indeterminate";
            }
            case StringId.DateEditToday:
            {
                  return "今天";
            }
            case StringId.DateEditClear:
            {
                  return "清除";
            }
            case StringId.OK:
            {
                  return "&OK";
            }
            case StringId.Cancel:
            {
                  return "&Cancel";
            }
            case StringId.NavigatorFirstButtonHint:
            {
                  return "首个";
            }
            case StringId.NavigatorPreviousButtonHint:
            {
                  return "上一个";
            }
            case StringId.NavigatorPreviousPageButtonHint:
            {
                  return "上一页";
            }
            case StringId.NavigatorNextButtonHint:
            {
                  return "下一个";
            }
            case StringId.NavigatorNextPageButtonHint:
            {
                  return "下一页";
            }
            case StringId.NavigatorLastButtonHint:
            {
                  return "最后";
            }
            case StringId.NavigatorAppendButtonHint:
            {
                  return "增加";
            }
            case StringId.NavigatorRemoveButtonHint:
            {
                  return "删除";
            }
            case StringId.NavigatorEditButtonHint:
            {
                  return "编辑";
            }
            case StringId.NavigatorEndEditButtonHint:
            {
                  return "结束编辑";
            }
            case StringId.NavigatorCancelEditButtonHint:
            {
                  return "中断编辑";
            }
            case StringId.NavigatorTextStringFormat:
            {
                  return "记录 {0} 至 {1}";
            }
            case StringId.PictureEditMenuCut:
            {
                  return "剪切";
            }
            case StringId.PictureEditMenuCopy:
            {
                  return "复制";
            }
            case StringId.PictureEditMenuPaste:
            {
                  return "粘贴";
            }
            case StringId.PictureEditMenuDelete:
            {
                  return "删除";
            }
            case StringId.PictureEditMenuLoad:
            {
                  return "打开";
            }
            case StringId.PictureEditMenuSave:
            {
                  return "保存";
            }
            case StringId.PictureEditOpenFileFilter:
            {
                  return "Bitmap Files (*.bmp)|*.bmp|Graphics Interchange Format (*.gif)|*.gif|JPEG File Interchange Format (*.jpg;*.jpeg)|*.jpg;*.jpeg|Icon Files (*.ico)|*.ico|All Picture Files |*.bmp;*.gif;*.jpg;*.jpeg;*.ico;*.png;*.tif|All Files |*.*";
            }
            case StringId.PictureEditSaveFileFilter:
            {
                  return "Bitmap Files (*.bmp)|*.bmp|Graphics Interchange Format (*.gif)|*.gif|JPEG File Interchange Format (*.jpg)|*.jpg";
            }
            case StringId.PictureEditOpenFileTitle:
            {
                  return "打开";
            }
            case StringId.PictureEditSaveFileTitle:
            {
                  return "保存至";
            }
            case StringId.PictureEditOpenFileError:
            {
                  return "错误的图片格式!";
            }
            case StringId.PictureEditOpenFileErrorCaption:
            {
                  return "打开错误";
            }
            case StringId.LookUpEditValueIsNull:
            {
                  return "[无数据]";
            }
            case StringId.LookUpInvalidEditValueType:
            {
                  return "非法数据类型.";
            }
            case StringId.MaskBoxValidateError:
            {
                  return "The entered value is incomplete.  Do you want to correct it?/r/n/r/nYes - return to the editor and correct the value./r/nNo - leave the value as is./r/nCancel - reset to the previous value./r/n";
            }
            case StringId.UnknownPictureFormat:
            {
                  return "未知图像格式!!";
            }
            case StringId.DataEmpty:
            {
                  return "无图像";
            }
            case StringId.NotValidArrayLength:
            {
                  return "Not valid array length.";
            }
            case StringId.ImagePopupEmpty:
            {
                  return "(空)";
            }
            case StringId.ImagePopupPicture:
            {
                  return "(图像)";
            }
            case StringId.ColorTabCustom:
            {
                  return "Custom";
            }
            case StringId.ColorTabWeb:
            {
                  return "Web";
            }
            case StringId.ColorTabSystem:
            {
                  return "System";
            }
            case StringId.CalcButtonMC:
            {
                  return "MC";
            }
            case StringId.CalcButtonMR:
            {
                  return "MR";
            }
            case StringId.CalcButtonMS:
            {
                  return "MS";
            }
            case StringId.CalcButtonMx:
            {
                  return "M+";
            }
            case StringId.CalcButtonSqrt:
            {
                  return "sqrt";
            }
            case StringId.CalcButtonBack:
            {
                  return "Back";
            }
            case StringId.CalcButtonCE:
            {
                  return "CE";
            }
            case StringId.CalcButtonC:
            {
                  return "C";
            }
            case StringId.CalcError:
            {
                  return "Calculation Error";
            }
      }
      return "";
}
    }

VB.NET
Imports DevExpress.XtraEditors.Controls.Localizer
Imports DevExpress.XtraEditors.ViewInfo
Imports DevExpress.XtraEditors.Controls
Public Class XtraImagesEdit_CN
    Inherits DevExpress.XtraEditors.Controls.Localizer
    Public Overrides ReadOnly Property Language() As String
        Get
            Return "简体中文"
        End Get
    End Property

    Public Overrides Function GetLocalizedString(ByVal id As DevExpress.XtraEditors.Controls.StringId) As String
        Select Case id
            Case StringId.None
                Return ""
            Case StringId.CaptionError
                Return "错误"
            Case StringId.InvalidValueText
                Return "非法值"
            Case StringId.CheckChecked
                Return "选中"
            Case StringId.CheckUnchecked
                Return "未选中"
            Case StringId.CheckIndeterminate
                Return "Indeterminate"
            Case StringId.DateEditToday
                Return "今天"
            Case StringId.DateEditClear
                Return "清除"
            Case StringId.OK
                Return "&OK"
            Case StringId.Cancel
                Return "&Cancel"
            Case StringId.NavigatorFirstButtonHint
                Return "首个"
            Case StringId.NavigatorPreviousButtonHint
                Return "上一个"
            Case StringId.NavigatorPreviousPageButtonHint
                Return "上一页"
            Case StringId.NavigatorNextButtonHint
                Return "下一个"
            Case StringId.NavigatorNextPageButtonHint
                Return "下一页"
            Case StringId.NavigatorLastButtonHint
                Return "最后"
            Case StringId.NavigatorAppendButtonHint
                Return "增加"
            Case StringId.NavigatorRemoveButtonHint
                Return "删除"
            Case StringId.NavigatorEditButtonHint
                Return "编辑"
            Case StringId.NavigatorEndEditButtonHint
                Return "结束编辑"
            Case StringId.NavigatorCancelEditButtonHint
                Return "中断编辑"
            Case StringId.NavigatorTextStringFormat
                Return "记录 {0} 至 {1}"

            Case DevExpress.XtraEditors.Controls.StringId.PictureEditMenuCopy
                Return "复制"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditMenuCut
                Return "剪切"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditMenuDelete
                Return "删除"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditMenuLoad
                Return "打开"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditMenuPaste
                Return "粘贴"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditMenuSave
                Return "保存"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditOpenFileError
                Return "打开错误!"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditOpenFileErrorCaption
                Return "打开错误!"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditOpenFileFilter
                Return "图形文件(*.jpg)|*.jpg|所有图形文件(*.*)|*.*"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditOpenFileTitle
                Return ""
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditSaveFileFilter
                Return "PNG文件(*.png)|*.png|GIF文件(*.gif)|*.gif|JPEG文件(*.jpg)|*.jpg"
            Case DevExpress.XtraEditors.Controls.StringId.PictureEditSaveFileTitle
                Return ""
            Case DevExpress.XtraEditors.Controls.StringId.OK
                Return "确定"
            Case DevExpress.XtraEditors.Controls.StringId.Cancel
                Return "取消"
            Case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxOkButtonText
                Return "确定"
            Case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxCancelButtonText
                Return "取消"
            Case DevExpress.XtraEditors.Controls.StringId.XtraMessageBoxNoButtonText
                Return "否"
            Case DevExpress.XtraEditors.Controls.StringId.TextEditMenuCopy
                Return "复制"
            Case DevExpress.XtraEditors.Controls.StringId.TextEditMenuCut
                Return "剪切"
            Case DevExpress.XtraEditors.Controls.StringId.TextEditMenuDelete
                Return "删除"
            Case DevExpress.XtraEditors.Controls.StringId.TextEditMenuPaste
                Return "粘贴"
            Case DevExpress.XtraEditors.Controls.StringId.TextEditMenuSelectAll
                Return "全选"
            Case DevExpress.XtraEditors.Controls.StringId.TextEditMenuUndo
                Return "取消"
            Case StringId.LookUpEditValueIsNull
                Return "[无数据]"
            Case StringId.LookUpInvalidEditValueType
                Return "非法数据类型."
            Case StringId.MaskBoxValidateError
                Return "The entered value is incomplete. Do you want to correct it?" & Microsoft.VisualBasic.Chr(13) & "" & Microsoft.VisualBasic.Chr(10) & "" & Microsoft.VisualBasic.Chr(13) & "" & Microsoft.VisualBasic.Chr(10) & "Yes - return to the editor and correct the value." & Microsoft.VisualBasic.Chr(13) & "" & Microsoft.VisualBasic.Chr(10) & "No - leave the value as is." & Microsoft.VisualBasic.Chr(13) & "" & Microsoft.VisualBasic.Chr(10) & "Cancel - reset to the previous value." & Microsoft.VisualBasic.Chr(13) & "" & Microsoft.VisualBasic.Chr(10) & ""
            Case StringId.UnknownPictureFormat
                Return "未知图像格式!!"
            Case StringId.DataEmpty
                Return "无图像"
            Case StringId.NotValidArrayLength
                Return "Not valid array length."
            Case StringId.ImagePopupEmpty
                Return "(空)"
            Case StringId.ImagePopupPicture
                Return "(图像)"
            Case StringId.ColorTabCustom
                Return "Custom"
            Case StringId.ColorTabWeb
                Return "Web"
            Case StringId.ColorTabSystem
                Return "System"
            Case StringId.CalcButtonMC
                Return "MC"
            Case StringId.CalcButtonMR
                Return "MR"
            Case StringId.CalcButtonMS
                Return "MS"
            Case StringId.CalcButtonMx
                Return "M+"
            Case StringId.CalcButtonSqrt
                Return "sqrt"
            Case StringId.CalcButtonBack
                Return "Back"
            Case StringId.CalcButtonCE
                Return "CE"
            Case StringId.CalcButtonC
                Return "C"
            Case StringId.CalcError
                Return "Calculation Error"
        End Select


        Return ""
    End Function

End Class

 

 

XtraGrid的汉化:
C#:

using DevExpress.XtraGrid.Localization;
 
// creating the Localizer descendant
public class Gridzhcn : GridLocalizer 
{
    // overriding the GetLocalizedString method
    public override string GetLocalizedString(GridStringId id)
    {
        switch (id)
        {
            case GridStringId.FileIsNotFoundError:
            {
                return "File {0} is not found";
            }
            case GridStringId.ColumnViewExceptionMessage:
            {
                return " 请改正错误数据 ?";
            }
            case GridStringId.CustomizationCaption:
            {
                return "字段隐藏窗口";
            }
            case GridStringId.CustomizationColumns:
            {
                return "Columns";
            }
            case GridStringId.CustomizationBands:
            {
                return "Bands";
            }
            case GridStringId.PopupFilterAll:
            {
                return "(所有)";
            }
            case GridStringId.PopupFilterCustom:
            {
                return "(自定义)";
            }
            case GridStringId.PopupFilterBlanks:
            {
                return "(空值)";
            }
            case GridStringId.PopupFilterNonBlanks:
            {
                return "(非空值)";
            }
            case GridStringId.CustomFilterDialogFormCaption:
            {
                return "自定义筛选条件";
            }
            case GridStringId.CustomFilterDialogCaption:
            {
                return "条件为:";
            }
            case GridStringId.CustomFilterDialogRadioAnd:
            {
                return "&And";
            }
            case GridStringId.CustomFilterDialogRadioOr:
            {
                return "&Or";
            }
            case GridStringId.CustomFilterDialogOkButton:
            {
                return "&Ok";
            }
            case GridStringId.CustomFilterDialog2FieldCheck:
            {
                return "Field";
            }
            case GridStringId.CustomFilterDialogCancelButton:
            {
                return "&Cancel";
            }
            case GridStringId.CustomFilterDialogConditionEQU:
            {
                return "等于=";
            }
            case GridStringId.CustomFilterDialogConditionNEQ:
            {
                return "不等于<>";
            }
            case GridStringId.CustomFilterDialogConditionGT:
            {
                return "大于>";
            }
            case GridStringId.CustomFilterDialogConditionGTE:
            {
                return "大于或等于>=";
            }
            case GridStringId.CustomFilterDialogConditionLT:
            {
                return "小于<";
            }
            case GridStringId.CustomFilterDialogConditionLTE:
            {
                return "小于或等于>=";
            }
            case GridStringId.CustomFilterDialogConditionBlanks:
            {
                return "空值";
            }
            case GridStringId.CustomFilterDialogConditionNonBlanks:
            {
                return "非空值";
            }
            case GridStringId.CustomFilterDialogConditionLike:
            {
                return "包含";
            }
            case GridStringId.CustomFilterDialogConditionNotLike:
            {
                return "不包含";
            }
            case GridStringId.MenuFooterSum:
            {
                return "Sum";
            }
            case GridStringId.MenuFooterMin:
            {
                return "Min";
            }
            case GridStringId.MenuFooterMax:
            {
                return "Max";
            }
            case GridStringId.MenuFooterCount:
            {
                return "Count";
            }
            case GridStringId.MenuFooterAverage:
            {
                return "Average";
            }
            case GridStringId.MenuFooterNone:
            {
                return "None";
            }
            case GridStringId.MenuFooterSumFormat:
            {
                return "SUM={0:#.##}";
            }
            case GridStringId.MenuFooterMinFormat:
            {
                return "MIN={0}";
            }
            case GridStringId.MenuFooterMaxFormat:
            {
                return "MAX={0}";
            }
            case GridStringId.MenuFooterCountFormat:
            {
                return "{0}";
            }
            case GridStringId.MenuFooterAverageFormat:
            {
                return "AVR={0:#.##}";
            }
            case GridStringId.MenuColumnSortAscending:
            {
                return "升序排序";
            }
            case GridStringId.MenuColumnSortDescending:
            {
                return "降序排序";
            }
            case GridStringId.MenuColumnGroup:
            {
                return "进行分组";
            }
            case GridStringId.MenuColumnUnGroup:
            {
                return "取消分组";
            }
            case GridStringId.MenuColumnColumnCustomization:
            {
                return "显示/隐藏字段";
            }
            case GridStringId.MenuColumnBestFit:
            {
                return "自动宽度";
            }
            case GridStringId.MenuColumnFilter:
            {
                return "筛选";
            }
            case GridStringId.MenuColumnClearFilter:
            {
                return "清除筛选条件";
            }
            case GridStringId.MenuColumnBestFitAllColumns:
            {
                return "自动宽度 (所有)";
            }
            case GridStringId.MenuGroupPanelFullExpand:
            {
                return "展开全部分组";
            }
            case GridStringId.MenuGroupPanelFullCollapse:
            {
                return "收缩全部分组";
            }
            case GridStringId.MenuGroupPanelClearGrouping:
            {
                return "清除所有分组";
            }
            case GridStringId.PrintDesignerGridView:
            {
                return "Report Designer (Grid View)";
            }
            case GridStringId.PrintDesignerCardView:
            {
                return "Report Designer (Card View)";
            }
            case GridStringId.PrintDesignerBandedView:
            {
                return "Report Designer (Banded View)";
            }
            case GridStringId.PrintDesignerBandHeader:
            {
                return "BandHeader";
            }
            case GridStringId.MenuColumnGroupBox:
            {
                return "分组区";
            }
        }
        return "";
    }
}

VB.NET:

Imports DevExpress.Xtragrid.Localization
Public Class XtraGrid_CN
    Inherits GridLocalizer
    'public override string GetLocalizedString(GridStringId id)
    Public Overrides Function Getlocalizedstring(ByVal id As GridStringId) As String
        Select Case id
            Case GridStringId.CardViewNewCard
                Return ""
            Case GridStringId.CardViewQuickCustomizationButton

                Return ""
            Case GridStringId.CardViewQuickCustomizationButtonFilter
                Return ""
            Case GridStringId.CardViewQuickCustomizationButtonSort
                Return ""
            Case GridStringId.ColumnViewExceptionMessage
                Return "数据录入有误,请更正!"
            Case GridStringId.CustomFilterDialog2FieldCheck
                Return "Field"
            Case GridStringId.CustomFilterDialogCancelButton
                Return "取消"
            Case GridStringId.CustomFilterDialogCaption

                Return "条件为:"
            Case GridStringId.CustomFilterDialogConditionBlanks

                Return "空值"
            Case GridStringId.CustomFilterDialogConditionEQU

                Return "等于="
            Case GridStringId.CustomFilterDialogConditionGT

                Return "大于>"
            Case GridStringId.CustomFilterDialogConditionGTE

                Return "大于或等于>="
            Case GridStringId.CustomFilterDialogConditionLike

                Return "包含"
            Case GridStringId.CustomFilterDialogConditionLT

                Return "小于<"
            Case GridStringId.CustomFilterDialogConditionLTE

                Return "小于或等于>="
            Case GridStringId.CustomFilterDialogConditionNEQ

                Return "不等于<>"
            Case GridStringId.CustomFilterDialogConditionNonBlanks

                Return "非空值"
            Case GridStringId.CustomFilterDialogConditionNotLike

                Return "不包含"
            Case GridStringId.CustomFilterDialogFormCaption

                Return "自定义筛选条件"
            Case GridStringId.CustomFilterDialogOkButton

                Return "确定(&O)"
            Case GridStringId.CustomFilterDialogRadioAnd

                Return "和(&A)"
            Case GridStringId.CustomFilterDialogRadioOr

                Return "或者(&O)"
            Case GridStringId.CustomizationBands

                Return "Bands"
            Case GridStringId.CustomizationCaption

                Return "字段隐藏窗口"
            Case GridStringId.CustomizationColumns

                Return "Columns"
            Case GridStringId.FileIsNotFoundError

                Return "文件 {0} 没找到!"
            Case GridStringId.GridGroupPanelText

                Return ""
            Case GridStringId.GridNewRowText

                Return ""
            Case GridStringId.GridOutlookIntervals

                Return ""
            Case GridStringId.MenuColumnBestFit

                Return "自动宽度"
            Case GridStringId.MenuColumnBestFitAllColumns

                Return "自动宽度(全部)"
            Case GridStringId.MenuColumnClearFilter

                Return "清除筛选条件"
            Case GridStringId.MenuColumnColumnCustomization

                Return "显示/隐藏字段"
            Case GridStringId.MenuColumnFilter

                Return "筛选"
            Case GridStringId.MenuColumnGroup

                Return "进行分组"
            Case GridStringId.MenuColumnGroupBox

                Return "分组区"
            Case GridStringId.MenuColumnSortAscending

                Return "升序排序"
            Case GridStringId.MenuColumnSortDescending

                Return "降序排序"
            Case GridStringId.MenuColumnUnGroup

                Return "取消分组"
            Case GridStringId.MenuFooterAverage

                Return "平均值"
            Case GridStringId.MenuFooterAverageFormat

                Return "平均值={0:#.##}"
            Case GridStringId.MenuFooterCount

                Return "列数"
            Case GridStringId.MenuFooterCountFormat

                Return "{0}"
            Case GridStringId.MenuFooterMax

                Return "最大值"
            Case GridStringId.MenuFooterMaxFormat

                Return "最大值={0}"
            Case GridStringId.MenuFooterMin

                Return "最小"
            Case GridStringId.MenuFooterMinFormat

                Return "最小值={0}"
            Case GridStringId.MenuFooterNone

                Return "没有"
            Case GridStringId.MenuFooterSum

                Return "求和"
            Case GridStringId.MenuFooterSumFormat

                Return "求和={0:#.##}"
            Case GridStringId.MenuGroupPanelClearGrouping

                Return "取消所有分组"
            Case GridStringId.MenuGroupPanelFullCollapse

                Return "收缩全部分组"
            Case GridStringId.MenuGroupPanelFullExpand

                Return "展开全部分组"
            Case GridStringId.PopupFilterAll

                Return "(所有)"
            Case GridStringId.PopupFilterBlanks

                Return "(空值)"
            Case GridStringId.PopupFilterCustom

                Return "(自定义)"
            Case GridStringId.PopupFilterNonBlanks

                Return "(非空值)"
            Case GridStringId.PrintDesignerBandedView

                Return ""
            Case GridStringId.PrintDesignerBandHeader

                Return ""
            Case GridStringId.PrintDesignerCardView

                Return ""
            Case GridStringId.PrintDesignerDescription

                Return ""
            Case GridStringId.PrintDesignerGridView

                Return ""

            Case GridStringId.WindowErrorCaption

                Return "错误"
        End Select
        Return ""
    End Function


End Class

XtraPrinting的汉化:
C#:
using System;

using System.Data;
using  DevExpress.XtraPrinting.Localization ;
using DevExpress.XtraEditors.ViewInfo;
namespace ReportView
{
    public class ChineaseReportLocalizer : DevExpress.XtraPrinting.Localization.PreviewLocalizer
    {

        public override string Language { get { return "简体中文"; }}
        public override string GetLocalizedString(PreviewStringId id)
        {
            string ret = "";
            switch(id)
            {
                case  PreviewStringId.PreviewForm_Caption : return "统计报表预览";
                case  PreviewStringId.MenuItem_File : return "文件";
                case  PreviewStringId.MenuItem_PageSetup : return "页面设置";
                case  PreviewStringId.MenuItem_PrintDirect : return "打印设置";
                case  PreviewStringId.MenuItem_Print : return "打印";
                case  PreviewStringId.MenuItem_Export : return "导出";
                case  PreviewStringId.MenuItem_PdfDocument : return "Pdf文档";
                case  PreviewStringId.MenuItem_RtfDocument : return "Rtf文档";
                case  PreviewStringId.MenuItem_TxtDocument : return "Txt文档";
                case  PreviewStringId.MenuItem_XlsDocument : return "Xls文档";
                case  PreviewStringId.MenuItem_HtmDocument : return "Htm文档";
                case  PreviewStringId.MenuItem_GraphicDocument : return "Graphic文档";
                case  PreviewStringId.MenuItem_CsvDocument : return "Csv文档";
                case  PreviewStringId.MenuItem_MhtDocument : return "Mht文档";
                case  PreviewStringId.MenuItem_Send : return "发送";
                case  PreviewStringId.MenuItem_Exit : return "退出";

                case  PreviewStringId.MenuItem_View : return "查看";
                case  PreviewStringId.MenuItem_ViewToolbar : return "工具栏";
                case  PreviewStringId.MenuItem_ViewStatusbar : return "状态条";

                case  PreviewStringId.MenuItem_Background : return "背景";
                case  PreviewStringId.MenuItem_BackgrColor : return "颜色";
                case  PreviewStringId.MenuItem_Watermark : return "水印";

                case  PreviewStringId.Msg_IncorrectPageRange : return "设置的页边距不正确";
 
                case  PreviewStringId.TB_TTip_PageSetup : return "页面设置";
                case  PreviewStringId.TB_TTip_Print : return "打印";
                case  PreviewStringId.TB_TTip_Export : return "导出";
                case  PreviewStringId.TB_TTip_Close : return "退出";
                case  PreviewStringId.TB_TTip_Send : return "发送";
                default:
                    ret = "";
                    break;
            }
             
            return ret;
        }

    }

}

VB.NET:

Imports System
Imports System.Data
Imports DevExpress.XtraPrinting.Localization
Imports DevExpress.XtraEditors.ViewInfo

Public Class ChineaseReportLocalizer
    Inherits DevExpress.XtraPrinting.Localization.PreviewLocalizer

    Public Overloads Overrides ReadOnly Property Language() As String
        Get
            Return "简体中文"
        End Get
    End Property

    Public Overloads Overrides Function GetLocalizedString(ByVal id As PreviewStringId) As String
        Dim ret As String = ""
        Select Case id
            Case PreviewStringId.PreviewForm_Caption
                Return "统计报表预览"
            Case PreviewStringId.MenuItem_File
                Return "文件"
            Case PreviewStringId.MenuItem_PageSetup
                Return "页面设置"
            Case PreviewStringId.MenuItem_PrintDirect
                Return "打印设置"
            Case PreviewStringId.MenuItem_Print
                Return "打印"
            Case PreviewStringId.MenuItem_Export
                Return "导出"
            Case PreviewStringId.MenuItem_PdfDocument
                Return "Pdf文档"
            Case PreviewStringId.MenuItem_RtfDocument
                Return "Rtf文档"
            Case PreviewStringId.MenuItem_TxtDocument
                Return "Txt文档"
            Case PreviewStringId.MenuItem_XlsDocument
                Return "Xls文档"
            Case PreviewStringId.MenuItem_HtmDocument
                Return "Htm文档"
            Case PreviewStringId.MenuItem_GraphicDocument
                Return "Graphic文档"
            Case PreviewStringId.MenuItem_CsvDocument
                Return "Csv文档"
            Case PreviewStringId.MenuItem_MhtDocument
                Return "Mht文档"
            Case PreviewStringId.MenuItem_Send
                Return "发送"
            Case PreviewStringId.MenuItem_Exit
                Return "退出"
            Case PreviewStringId.MenuItem_View
                Return "查看"
            Case PreviewStringId.MenuItem_ViewToolbar
                Return "工具栏"
            Case PreviewStringId.MenuItem_ViewStatusbar
                Return "状态条"
            Case PreviewStringId.MenuItem_Background
                Return "背景"
            Case PreviewStringId.MenuItem_BackgrColor
                Return "颜色"
            Case PreviewStringId.MenuItem_Watermark
                Return "水印"
            Case PreviewStringId.Msg_IncorrectPageRange
                Return "设置的页边距不正确"
            Case PreviewStringId.TB_TTip_PageSetup
                Return "页面设置"
            Case PreviewStringId.TB_TTip_Print
                Return "打印"
            Case PreviewStringId.TB_TTip_Export
                Return "导出"
            Case PreviewStringId.TB_TTip_Close
                Return "退出"
            Case PreviewStringId.TB_TTip_Send
                Return "发送"
            Case Else
                ret = ""
                ' break
        End Select
        Return ret
    End Function
End Class 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值