xtrareports-402603-web-reporting-common-features-localization-localization-in-reporting-for-react.md
This topic describes how to localize the Document Viewer and End-User Report Designer UI in a React application.
In React applications, import the localized JSON resources and use the CustomizeLocalization callback to load localized strings using the LoadMessages method. You can also use the UpdateLocalization method to substitute particular strings.
Log into the DevExpress website.
Open the DevExpress Localization Service.
Select your target language, modify translations, and click the Download button. Refer to the following help topic for detailed information: Localization Service.
Unpack the downloaded executable file to get the satellite assemblies and json resources directory. This directory contains the following JSON files required to localize the reporting controls (where xx is a culture name):
Tip
The component’s UI is built on DevExtreme widgets, so to localize the editors you should also use one of the approaches described in the following topic: DevExtreme - Localization. Specify web server’s thread culture to apply culture-specific formats to numbers and dates.
Copy the dx-analytics-core.xx.json, dx-reporting.xx.json, and dx-rich.xx.json (optional) (where xx is the culture ID) files obtained in the previous section to the application root folder.
Open the component file and add the code that handles the CustomizeLocalization callback. The following code substitutes localizable strings used in Reporting UI with their German equivalents:
Recompile the project and open the application in the browser (default URL is http://localhost:3000/).
Note
The UI Localization Client requires localization resources to be loaded from the server to work properly in a React application.
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.
To use the UI Localization Client in you application:
CustomizeLocalization event to localize your application.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.