New to Telerik Reporting? Download free 30-day trial

How to set another language of the Kendo date picker in HTML5 MVC Report Viewer

Environment

Product Progress® Telerik® Reporting

Description

The datepicker is a Kendo widget. That's why the Html5 MVC Report Viewer localization will not affect its date representation. This KB article gives a brief description of how to set another language. The example will demonstrate the date representation in Spanish.

Solution

  1. Add the following script after the script of the viewer:

    <script src="~/Scripts/telerikReportViewer.kendo-14.2.20.1021.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2019.1.115/js/cultures/kendo.culture.es-PY.min.js"></script>    
    
  2. Add the following script in the web page which holds the report viewer:

     <script src="http://kendo.cdn.telerik.com/VERSION/js/cultures/kendo.culture.[culture-identifier].min.js"></script>
    

    For example:

    <script src="http://kendo.cdn.telerik.com/2019.1.115/js/cultures/kendo.culture.es-PY.min.js"></script>
    
  3. Then the culture of the Kendo widget must be set through the script below which should be placed before the report viewer's initialization:

    <script type="text/javascript">
        kendo.culture("es-PY");
    </script>
    

    Demo

    A sample project can be found in our GitHub repository.

In this article