Localization of Bold Reports® ASP.NET MVC Report Viewer Classic
To localize the Bold Reports® ASP.NET MVC Report Viewer Classic, refer to the culture script files for the culture you need and set the culture name in the locale property of the Report Viewer Classic. Localization shows static text such as tooltips, the parameter block, and dialog text in a specific culture. For the French culture, refer to the following script files.
* `ej.localetexts.fr-FR.min.js`
* `ej.culture.fr-FR.min.js`-
Install the
BoldReports.GlobalNuget package in your MVC application. -
Refer to this
ej.localetexts.fr-FR.min.jsscript file from theScriptsfolder of your application.<script src="~/Scripts/bold-reports/l10n/reportdesigner/ej.localetexts.fr-FR.min.js"></script> -
Refer to this
ej.culture.fr-FR.min.jsscript file from theScriptsfolder of your application.<script src="~/Scripts/bold-reports/i18n/ej.culture.fr-FR.min.js"></script> -
To render the localized Report Viewer Classic, use the following code snippet:
- The following code example illustrates how to localize Report Viewer in the
Index.cshtmlpage.
@(Html.Bold().ReportViewer("viewer") .ReportServiceUrl("/api/ReportViewer") .ReportPath("~/Resources/sales-order-detail.rdl") .Locale("fr-FR") )- The following code example illustrates how to localize Report Viewer Classic in the
~/Views/Shared/_Layout.cshtmlpage.
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Render Report Viewer in French localization</title> @Styles.Render("~/Content/css") @Styles.Render("~/Content/material/bold.reports.all.min.css") @Scripts.Render("~/bundles/modernizr") </head> <body> <div style="min-height: 600px;width: 100%;"> @RenderBody() </div> @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") <!--Render the gauge item. Add these scripts only if your report contains the gauge report item.--> @Scripts.Render("~/Scripts/bold-reports/common/ej2-base.min.js") @Scripts.Render("~/Scripts/bold-reports/common/ej2-data.min.js") @Scripts.Render("~/Scripts/bold-reports/common/ej2-pdf-export.min.js") @Scripts.Render("~/Scripts/bold-reports/common/ej2-svg-base.min.js") @Scripts.Render("~/Scripts/data-visualization/ej2-circulargauge.min.js") @Scripts.Render("~/Scripts/data-visualization/ej2-lineargauge.min.js") <!--Renders the map item. Add this script only if your report contains the map report item.--> @Scripts.Render("~/Scripts/data-visualization/ej2-maps.min.js") @Scripts.Render("~/Scripts/common/bold.reports.common.min.js") @Scripts.Render("~/Scripts/common/bold.reports.widgets.min.js") <!--Render the chart item. Add these scripts only if your report contains the chart report item.--> @Scripts.Render("~/Scripts/data-visualization/ej.chart.min.js") <!-- Report Viewer component script--> @Scripts.Render("~/Scripts/bold.report-viewer.min.js") <!-- Report Viewer french localization scripts--> @Scripts.Render("~/Scripts/l10n/ej.localetexts.fr-FR.min.js") @Scripts.Render("~/Scripts/i18n/ej.culture.fr-FR.min.js") @RenderSection("scripts", required: false) @Html.Bold().ScriptManager() </body> </html> - The following code example illustrates how to localize Report Viewer in the