This is a migrated thread and some comments may be shown as answers.

Kendo UI Grid Pager options are not translated

3 Answers 349 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sudeep
Top achievements
Rank 1
Sudeep asked on 31 Oct 2018, 06:06 AM

Hi,

I have a problem with kendo ui grid where the pager options are not getting translated based on culture.

options like: "items per page", Pager Buttons tooltips: "Next", "Previous", "Last", "First" and "Refresh" are not translated.

I am using Kendo Version: 2018.2.620

 

Could you Please help me out.

Thanks for helping.

 

3 Answers, 1 is accepted

Sort by
0
Tsvetomir
Telerik team
answered on 01 Nov 2018, 07:10 AM
Hi Sudeep,

Localizing the user messages is done via setting the CurrenUICulture. The Kendo UI for ASP.NET MVC Grid comes with built-in localized messages for a number of cultures listed in the Localization article. Note that there are rare occasions where the specific resource file might not have 100% of the messages translated. In such cases, the default en-US will be used.

In case the resource files are missing some of the messages needed to support your culture, you can modify the resx files and add them to your current ASP.NET MVC project. It is explained in details how this could be achieved in the Add New Localizations section of the Localization article:
Furthermore, as a reference, you can take a look at the Globalization live demo.
Also, it is always a great idea to keep Kendo UI version up-to-date. This will enable you to take advantage of cutting-edge functionality, newly introduced functionality, enhancements and bug fixes. There are updates related to the Localization of the widgets. Could you check if the grid is fully localized with the latest version?

Let me know if you need further clarifications. 

Kind regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sudeep
Top achievements
Rank 1
answered on 01 Nov 2018, 05:24 PM

Hi Tsvetomir's,

We are using the same thing, please see the attached image.
When I checked in "Kendo.culture.de.min.js" file there are no translations for kendo grid. Whereas in "kendo.messages.de-DE.min.js" we do have translations for kendo grid, but Pager options are not getting translated as mentioned earlier. 

Thanks for helping.

0
Tsvetomir
Telerik team
answered on 05 Nov 2018, 04:03 PM
Hi Sudeep,

Setting the culture via the JavaScript section sets the culture on the client. The culture is responsible for date formatting, currency, number formatting etc. The culture used for the localization messages is determined by the CurrentUICulture which has to be set on the server. In order to set the CurrentUICulture, override the Controller.Initialize method as follows:

protected override void Initialize(System.Web.Routing.RequestContext requestContext)
{
    Thread.CurrentThread.CurrentCulture =
        Thread.CurrentThread.CurrentUICulture =
            new CultureInfo(requestContext.HttpContext.Request["my-culture"]);
 
    base.Initialize(requestContext);
}

More information on matching cultures could be found here:
I have created a sample project and I have added the German culture in the Script folder along with the German messages. From the Index View, choose the de-DE culture from the dropdown and check whether the messages responsible for the grid pager change. 

The Kendo UI version used is 2018.3.1017. Could you try upgrading to the latest version and check if the grid is fully localized?

Compare the attached project to the one on your side and see what are the essential differences between the two. If the issue persists, please modify the sample and send it back to us for further investigation. 

Regards,
Tsvetomir
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Sudeep
Top achievements
Rank 1
Answers by
Tsvetomir
Telerik team
Sudeep
Top achievements
Rank 1
Share this question
or