Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Collapse]Build an Application
  [Expand]Choose Application UI
   Data Management Controls
  [Expand]Printing and Exporting
  [Expand]WinForms MVVM
  [Expand]Skins
  [Collapse]Localization
    Localizing WinForms Controls via Satellite Resource Assemblies
    Localizing WinForms Controls via Localizer Objects
  [Expand]Right-to-Left Layout
   Redistribution and Deployment
 [Expand]Controls and Libraries
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Localizing WinForms Controls via Localizer Objects

Each DevExpress component or library has a specific Localizer class (see the table below) that provides localized strings. For example, in the Data Grid control, this is the GridLocalizer class.

Note

Important: Not all strings can be translated via Localizer classes. Some components contain form resources (e.g., the XtraReports Search dialog), and the only way to translate them is to create satellite assemblies. Thus, localization via resources is the preferable solution.

Expanded Localization Process

The localization process via custom localizers is straightforward.

  • Create a descendant of a corresponding Localizer class and override either its GetLocalizedString or PopulateStringTable method. The GetLocalizedString method should return strings for specific string resource identifiers. The PopulateStringTable method adds strings for specified resource identifiers.

  • To use this localizer, assign an instance of this class to the static Active property of the localizer class you derived from.

The following table lists Localizer classes and Resource String enumerations for DevExpress Windows Forms products.

Product Localizer Class Resource String Enumeration Namespace
Chart Control ChartLocalizer ChartStringId DevExpress.XtraCharts.Localization
Data Grid GridLocalizer GridStringId DevExpress.XtraGrid.Localization
Diagrams DiagramControlLocalizer DevExpress.Diagram.Core.Localization.DiagramControlStringId DevExpress.Diagram.Core.Localization
Editors and Controls Localizer StringId DevExpress.XtraEditors.Controls
Gauges GaugesCoreLocalizer GaugesCoreStringId DevExpress.XtraGauges.Core.Localization
Layout Manager LayoutLocalizer LayoutStringId DevExpress.XtraLayout.Localization
Navigation Bar NavBarLocalizer NavBarStringId DevExpress.XtraNavBar
PDF Viewer PdfCoreLocalizer / XtraPdfViewerLocalizer PdfCoreStringId / XtraPdfViewerStringId DevExpress.Pdf.Localization / DevExpress.XtraPdfViewer.Localization
Pivot Grid PivotGridLocalizer PivotGridStringId DevExpress.XtraPivotGrid.Localization
Printing-Exporting PreviewLocalizer PreviewStringId DevExpress.XtraPrinting.Localization
Reporting ReportLocalizer ReportStringId DevExpress.XtraReports.Localization
Ribbon, Bars and Menu BarLocalizer BarString DevExpress.XtraBars.Localization
Rich Text Editor XtraRichEditLocalizer, RichEditExtensionsLocalizer / OfficeLocalizer XtraRichEditStringId, RichEditExtensionsStringId / OfficeStringId DevExpress.XtraRichEdit.Localization / DevExpress.Office.Localization
Scheduler SchedulerLocalizer SchedulerStringId DevExpress.XtraScheduler.Localization
Snap SnapLocalizer / SnapExtensionsLocalizer/ OfficeLocalizer SnapStringId / SnapExtensionsStringId / OfficeStringId DevExpress.Snap.Localization / DevExpress.Snap.Extensions.Localization / DevExpress.Office.Localization
Spell Checker SpellCheckerLocalizer SpellCheckerStringId DevExpress.XtraSpellChecker.Localization
Spreadsheet XtraSpreadsheetLocalizer, XtraSpreadsheetFunctionNameLocalizer, XtraSpreadsheetCellErrorNameLocalizer / OfficeLocalizer XtraSpreadsheetStringId / XtraSpreadsheetFunctionNameStringId / XtraSpreadsheetCellErrorNameStringId / OfficeStringId DevExpress.XtraSpreadsheet.Localization / DevExpress.Office.Localization
Tree List TreeListLocalizer TreeListStringId DevExpress.XtraTreeList.Localization
Vertical Grid VGridLocalizer VGridStringId DevExpress.XtraVerticalGrid.Localization

Expanded Example

The following example demonstrates how to localize the Grid Control UI and the DevExpress Editors Library UI into German via a custom localizer.

The result of localizing the runtime grid interface is shown below.

First, create descendants of the GridLocalizer and Localizer classes to provide custom translations for a subset of localizable strings.

To use these Localizers, assign instances of the GermanGridLocalizer and GermanEditorsLocalizer classes to their ancestor's Active property.

How would you rate this topic?​​​​​​​