Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[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]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 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.

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

Expanded Example

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E1315.

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.

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