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

Localization problems

6 Answers 537 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nassouh Chehayeb
Top achievements
Rank 1
Nassouh Chehayeb asked on 20 Jun 2016, 04:19 PM

Hello.

I'm currently working on a Spanish application.  The project uses the localization javascript files as described here:

http://docs.telerik.com/kendo-ui/aspnet-mvc/globalization

This is my code:

    <script src="~/Scripts/jquery-2.2.2.min.js"></script>
    <script src="~/Scripts/kendo/2016.2.607/kendo.all.min.js"></script>
    <script src="~/Scripts/kendo/2016.2.607/kendo.core.min.js"></script>
    <script src="~/Scripts/kendo/cultures/kendo.culture.es-ES.min.js"></script>
    <script src="~/Scripts/kendo/messages/kendo.messages.es-ES.min.js"></script>
    <script> kendo.culture("es-ES");</script>

The problem is that 'kendo.messages.es-ES.min.js' is ignored. There are some text that are not translated. Checking every thing we found out that the translations were taken from the 'Kendo.Mvc.resources.dll' in the 'bin/es-ES' folder. This 'dll' has some texts translated and orders not as you can see in the attached image. You can noticed that in the 'kendo.messages.es-ES.min.js' the texts are translated, but in the resulting grid there's not the case.

After that I figured out that if I delete the file 'Kendo.Mvc.resources.dll' in 'bin/es-ES' while running the application in the localhost the texts are translated using the translations of the 'kendo.messages.es-ES.min.js'. So I suppose that the 'kendo.messages.es-ES.min.js' overwrites the default English messages but the 'Kendo.Mvc.resources.dll' in 'bin/es-ES overwrites 'kendo.messages.es-ES.min.js' no matter where I call this javascript.

So, how can I change this behavior giving preference to the 'kendo.messages.es-ES.min.js' javascript? Or is any way to edit the Spanish 'Kendo.Mvc.resources.dll' and add the missing messages?

6 Answers, 1 is accepted

Sort by
0
Nassouh Chehayeb
Top achievements
Rank 1
answered on 20 Jun 2016, 04:30 PM

I put something wrong and there's no edit option.

The third script is not <script src="~/Scripts/kendo/2016.2.607/kendo.core.min.js"></script> is <script src="~/Scripts/kendo/2016.2.607/kendo.aspnetmvc.min.js"></script>

Sorry for the mistake.

0
Accepted
Alexander Valchev
Telerik team
answered on 22 Jun 2016, 08:08 AM
Hi Nassouh,

The MVC Kendo wrappers localization differs from the standard Kendo JavaScript localization.

As you correctly noticed the MVC wrapper uses Kendo.Mvc.resources.dll. The difference comes from the fact that the MVC Grid wrapper renders not only JavaScript configuration but also some HTML content. For example the pager messages are rendered directly in the markup by the server wrapper.

The kendo.messages.es-ES.min.js file changes the messages configuration in the widget's prototype which will work for all strings that are *not* directly rendered in the HTML by the server wrapper.

I am afraid that there is no way to change what the MVC server wrappers renders. You may only create a custom MVC resource file that will translate the message rendered on the server.


Regards,
Alexander Valchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Nassouh Chehayeb
Top achievements
Rank 1
answered on 27 Jun 2016, 01:25 PM

Hi Alexander,

Finally I opted to create a custom MVC resource file. It was difficult to find the '\src\Kendo.Mvc\Kendo.Mvc.csproj' but finally I figured out by opening the README file. I suggest updating the guides for further cases about the localization of the 'Kendo.Mvc.csproj' project . 

Thank you for the explanation.

0
Alexander Valchev
Telerik team
answered on 29 Jun 2016, 08:13 AM
Hi Nassouh,

Thank you for the suggestion. We will review the help topic.

Regards,
Alexander Valchev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Khanh
Top achievements
Rank 1
answered on 13 Jul 2018, 08:49 AM

Dear admins,

I faced some issues related to localization when using Web Kendo grid. Currently, i'm using Kendo version 2017.2.621 and I want to localize my texts with language Español (América Latina), some texts for tooltip are not be localized as my expectation. Please see my attachment and help me found root causes as well as solutions. Thanks.

 

0
Dimitar
Telerik team
answered on 16 Jul 2018, 12:42 PM
Hi Khanh,

The reported issue is the same as this one. As explained in the following comment, these translations will appear, when "title", "logic", "additionalValue" and "additionalOperator" translation strings are set in the messages file used, e.g. in es-Es they should be set in this section. Pull requests for adding missing localization messages are welcome - Localization Contribution help section.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Nassouh Chehayeb
Top achievements
Rank 1
Answers by
Nassouh Chehayeb
Top achievements
Rank 1
Alexander Valchev
Telerik team
Khanh
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or