[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]ASP.NET WebForms Controls
 [Expand]ASP.NET MVC Extensions
 [Collapse]Localization
   Localizing ASP.NET Controls via Satellite Resource Assemblies
   Localizing ASP.NET Controls via Localizer Objects
   How to: Set a Culture for an ASP.NET Web Page
   Localizing ASP.NET Controls via Global Resources (Obsolete from 11.2)
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Localizing ASP.NET Controls via Localizer Objects

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

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 as follows.

  • Create a descendant of a corresponding Localizer class and override its GetLocalizedString method, which should return strings for specific string resource identifiers.
  • Define the Activate method, which creates an instance of your custom localizer with a localizer provider, and sets this provider as an active provider for the localizer.

  • Call the Activate method in the Application_Start event handler within the Global.asax file.

The following table lists Localizer classes and Resource String enumerations for DevExpress ASP.NET controls.

Product

Localizer Class

Resource String Enumeration

Namespace

Reporting

ASPxReportsLocalizer

ASPxReportsStringId

DevExpress.XtraReports.Web.Localization

Chart Control

ChartLocalizer

ChartStringId

DevExpress.XtraCharts.Localization

Grid View, Card View, Vertical Grid

ASPxGridViewLocalizer

ASPxGridViewStringId

DevExpress.Web.Localization

Spreadsheet

ASPxSpreadsheetLocalizer

ASPxSpreadsheetStringId

DevExpress.Web.ASPxSpreadsheet.Localization

Rich Text Editor

ASPxRichEditLocalizer

ASPxRichEditStringId

DevExpress.Web.ASPxRichEdit.Localization

Data and Image Navigation

Docking and Popups,

Site Navigation and Layout,

File Management,

Multi-Use Site Controls

ASPxperienceLocalizer

ASPxperienceStringId

DevExpress.Web.Localization

Scheduler

ASPxSchedulerLocalizer

ASPxSchedulerStringId

DevExpress.Web.ASPxScheduler.Localization

HTML Editor

ASPxHtmlEditorLocalizer

ASPxHtmlEditorStringId

DevExpress.Web.ASPxHtmlEditor.Localization

Pivot Grid

PivotGridLocalizer

PivotGridStringId

DevExpress.XtraPivotGrid.Localization

Tree List

ASPxTreeListLocalizer

ASPxTreeListStringId

DevExpress.Web.ASPxTreeList.Localization

Gauges

GaugesCoreLocalizer

GaugesCoreStringId

DevExpress.XtraGauges.Core.Localization

Data Editors

ASPxEditorsLocalizer

ASPxEditorsStringId

DevExpress.Web.Localization

Spell Checker

ASPxSpellCheckerLocalizer

ASPxSpellCheckerStringId

DevExpress.Web.ASPxSpellChecker.Localization

Expanded Example

The following example demonstrates how to localize the ASPxGridView control via a custom localizer. For another localization approach, refer to Localizing ASP.NET Controls via Satellite Resource Assemblies.

Is this topic helpful?​​​​​​​