Localization of Bold Reports® ASP.NET MVC Report Viewer

To localize the Bold Reports® ASP.NET MVC 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.

  1. Install the BoldReports.Global NuGet package in your MVC application.

  2. Refer to the ej.localetexts.fr-FR.min.js script file from the Scripts folder of your application.

    <script src="~/Scripts/bold-reports/v2.0/localization/l10n/ej.localetexts.fr-FR.min.js"></script>
  3. To render the localized Report Viewer, use the following code snippet:

    • The following code example illustrates how to localize the Report Viewer in the Index.cshtml page.
    @(Html.Bold().ReportViewer("viewer")
        .ReportServiceUrl("/api/ReportViewer")
        .ReportPath("~/Resources/sales-order-detail.rdl")
        .Locale("fr-FR")
    )
    • The following code example illustrates how to localize the Report Viewer in the ~/Views/Shared/_Layout.cshtml page.
    <!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/bold-reports/v2.0/tailwind-light/bold.report-viewer.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")
        <!-- Report Viewer component dependent script -->
        @Scripts.Render("~/Scripts/bold-reports/v2.0/common/bold.reports.common.min.js")
        @Scripts.Render("~/Scripts/bold-reports/v2.0/common/bold.reports.widgets.min.js")
        <!-- Report Viewer component script-->
        @Scripts.Render("~/Scripts/bold-reports/v2.0/bold.report-viewer.min.js")
        <!-- Report Viewer french localization scripts-->
        @Scripts.Render("~/Scripts/v2.0/localization/l10n/ej.localetexts.fr-FR.min.js")
        @RenderSection("scripts", required: false)
        @Html.Bold().ScriptManager()
    </body>
    </html>