Skip to main content

ReportResLocalizer Class

A default localizer to translate the Reporting resources.

Namespace: DevExpress.XtraReports.Localization

Assembly: DevExpress.XtraReports.v24.1.dll

NuGet Package: DevExpress.Reporting.Core


public class ReportResLocalizer :


The ReportResLocalizer class enables you to use both the satellite assemblies and Localizer technique to localize a reporting application.

Example - Translate Application UI to German

Do the following:

  1. Obtain the satellite assemblies for the de culture. For more information, review the following help topic: Localizing WinForms Controls with Satellite Resource Assemblies.
  2. Create the de folder in the application directory (for a Visual Studio project, it is the bin\Debug\ subdirectory) and copy the assemblies to the newly created folder.
  3. In the code, change the application thread culture and implement the ReportResLocalizer class descendant. The following code snippet translates the ReportDesignTool.DesignRibbonForm UI to German and replaces the text for the tooltip on the Favorites tab in the Properties Window:

    using DevExpress.XtraReports.Localization;
    using DevExpress.XtraReports.UI;
    // ...
        ReportLocalizer.Active = new DeReportLocalizer();
        System.Globalization.CultureInfo deCultureInfo = new System.Globalization.CultureInfo("de");
        Application.CurrentCulture = deCultureInfo;
        System.Threading.Thread.CurrentThread.CurrentCulture = deCultureInfo;
        System.Threading.Thread.CurrentThread.CurrentUICulture = deCultureInfo;
        ReportDesignTool designTool = new ReportDesignTool(new XtraReport());
    class DeReportLocalizer : ReportResLocalizer {
        public override string Language { get { return "de"; } }
        public override string GetLocalizedString(ReportStringId id) {
            string translation = "";
            switch (id) {
                case ReportStringId.UD_PropertyGrid_TabFavorites_Description:
                    return "Die Favoritenliste des Steuerelements durch Rechtsklick bearbeiten.";
                    translation = base.GetLocalizedString(id);
            return translation;

Note that you should use satellite resource assemblies localization as it is the most common localization technique supported in the .NET Framework. For more information, review the following help topic: Localizing WinForms Controls with Satellite Resource Assemblies.

Use Localizer objects to add missing translations. For more information, review the following help topic: Localize Reporting Applications.


See Also