xtrareports-404478-web-reporting-common-features-localization-localization-blazor-app.md
To localize the Native Report Viewer component, follow the guidelines in the following help topic: DevExpress Blazor Components- Localization. This solution will work because the user interface of the Native Report Viewer component is based on DevExpress Blazor Components.
To localize the JavaScript-based Document Viewer component, use the guidelines described in the following help topic: DevExtreme Localization. This method applies to Devexpress JS-based Reporting components because the user interface of these components is built with DevExtreme widgets.
The following code snippet forces UI widgets to use the German locale in a Blazor application:
View Example: Blazor Reporting (JavaScript-Based) - UI Customization API
window.DesignerCustomization = {
onCustomizeLocalization: function(s, e) {
DevExpress.localization.locale('de');
}
}
<head>
@...@
@DxResourceManager.RegisterScripts((config) => config.Register(new DxResource("/customization.js", 900)))
@...@
</head>
<DxReportDesigner ReportName="SampleReport" Height="1000px" Width="100%">
<DxReportDesignerCallbacks CustomizeLocalization="DesignerCustomization.onCustomizeLocalization" />
</DxReportDesigner>
To use the de locale, you should register the de.js file on the web page as described in the following help topic: DevExtreme Localization - Using Intl.
Note that the JavaScript-based Blazor Reporting components use the ASP.NET Core backend. You can find additional information on localization in the following help topic: Localize ASP.NET Core Reporting Components.
The UI Localization Client is a cross-platform utility that helps you identify non-translated strings in DevExpress UI controls and translate them during a debug session. The utility generates RESX files with translated resources and adds them to the project. The UI Localization Client loads all Web Reporting resource strings after the controls are rendered and does not reflect later UI interactions.
The UI Localization Client can be used with the following Reporting Components in a Blazor application:
To use the UI Localization Client in a Blazor WebAssembly application, make sure that the application gets the localization from the server. You can use the GetLocalizationAction property.
For more information refer to the following topic: UI Localization Client.
The resource strings for the Web Reporting Controls (Web Document Viewer and Web Report Designer) are located in the following localization containers in the UI Localization Client window:
DevExpress.XtraReports.Web.Localization.LocalizationContainerContains localization strings specific only to the Web Reporting Controls.DevExpress.Utils.Localization.CoreLibraryResourcesContains cross-platform localization strings used in the Web Reporting Controls.DevExpress.Web.Resources.Localization.LocalizationContainerContains localization strings common to DevExpress Web Components used in the Web Reporting Controls.