Localization of Bold Reports® React Report Viewer

To localize the Bold Reports® React Report Viewer, refer to the following corresponding culture script files and set the culture name to the locale property of the Report Viewer. Localization renders static text such as tooltips, the parameter block, and dialog text in a specific culture.

* `ej.localetexts.fr-FR.min.js`

Refer to the CDN links for Localization and Culture to get the Localization and Culture scripts for the available culture codes.

  • Run the following command to install the @boldreports/javascript-reporting-controls package.
npm install @boldreports/javascript-reporting-controls --save
  • Refer to the ej.localetexts.fr-FR.min.js script file from node_modules in the App.js file.
import React from 'react';
import './App.css';
//Report Viewer source
import '@boldreports/javascript-reporting-controls/Scripts/v2.0/bold.report-viewer.min';
import '@boldreports/javascript-reporting-controls/Content/v2.0/tailwind-light/bold.report-viewer.min.css';
//Data-Visualization
import '@boldreports/javascript-reporting-controls/Scripts/v2.0/common/bold.reports.common.min';
import '@boldreports/javascript-reporting-controls/Scripts/v2.0/common/bold.reports.widgets.min';
//Reports react base
import '@boldreports/react-reporting-components/Scripts/bold.reports.react.min';

import '@boldreports/javascript-reporting-controls/Scripts/v2.0/localization/l10n/ej.localetexts.fr-FR.min.js';
...
...

Initialize the locale property in the App.js file, as in the following code snippet:

 var locale = 'fr-FR';

 function App() {
     return (<div id="viewer" style={viewerStyle}>
     <BoldReportViewerComponent id="reportviewer-container"
     reportServiceUrl = {'https://demos.boldreports.com/services/api/ReportViewer'}
     reportPath = { 'GroupingAgg.rdl' }
     locale = {locale}
     >
     </BoldReportViewerComponent>
     </div>);
   }