Skip to main content
All docs
V23.2

DxDocumentViewerCallbacks.CustomizeLocalization Property

Specifies the handler for the CustomizeLocalization client-side event that allows you localize the Web Document Viewer.

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.Blazor.Reporting.v23.2.JSBasedControls.Common.dll

NuGet Package: DevExpress.Blazor.Reporting.JSBasedControls.Common

Declaration

[Parameter]
public string CustomizeLocalization { get; set; }

Property Value

Type Description
String

The name of a JavaScript function used to handle the CustomizeLocalization event.

Remarks

The CustomizeLocalization event enables you to localize the Web Document Viewer. Use the event argument’s LoadMessages method to load JSON files obtained from the DevExpress Localization Service.

The code below applies the German localized resources from JSON files. Localization files are in the wwwroot/js/localization folder.

For information on how to obtain the JSON localization files, refer to the following help topic: Localize ASP.NET Core Reporting Components.

window.ReportingViewerCustomization = {
    //Apply German localization.
    onCustomizeLocalization: function(s, e) {
        $.get("/js/localization/de.json").done(result => {
            e.WidgetLocalization.loadMessages(result);
        }).always(() => {
            e.WidgetLocalization.locale("de");
        })

        e.LoadMessages($.get("/js/localization/dx-analytics-core.de.json"));
        e.LoadMessages($.get("/js/localization/dx-reporting.de.json"));
    }
}
See Also