All docs
V21.1
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

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.v21.1.JSBasedControls.dll

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 Your ASP.NET Core Reporting Application.

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