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

Globalization on Kendo grid

2 Answers 339 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Laurent
Top achievements
Rank 1
Laurent asked on 13 Jul 2015, 09:39 AM

Hi,

 To allow the user to change the website language, I've added globalization on my grids following the instructions here.

~/Scripts/jquery.min.js
~/Scripts/kendo.all.min.js
~/Scripts/kendo.aspnetmvc.min.js
~/Scripts/cultures/kendo.culture.fr-BE.min.js
 The last instruction before the end of head tag is :

<script>
     kendo.culture('@culture');
</script>
I checked, all files are included in that order. However the grid messages and date en decimal formats remain in english as you can see in attached screenshots.

Note:

  • The user can change language on the fly (I've seen solutions using directive <globalization> in web.config. I think I cannot use that)
  • The language change but the date format must remains the same (comma for decimals and dd/MM/yyyy as date format)

I use editor template to edit grid inline but I cannot format the value that way. Am I missing something ?

 

2 Answers, 1 is accepted

Sort by
0
Laurent
Top achievements
Rank 1
answered on 13 Jul 2015, 12:35 PM
If I watch the kendo variable with my browser while running the application, I've got two cultures attached to the Kendo Grid
0
Georgi Krustev
Telerik team
answered on 15 Jul 2015, 08:41 AM
Hello Laurent,

In general, the globalization process of the project includes so called internationalization and localization. The Kendo culture script that you are adding ("fr-BE") covers the internationalization part, as it changes the number/currency and date formats. This will happen only if the script is loaded correct and the culture is set using kendo.culture (kendo.culture("fr-BE") in this case). If this is not done, then the widget will continue to use the "en-US" culture. That being said, you will need to verify that all of the required steps are done correctly.

The localization of the widget is handled by a separate Kendo localization resources. You can find a list of them here: Please note that they are community effort and we do not provide localization for all available Kendo culture scripts out there. If you would like to localize the grid using "fr-BE", then you will need to add such resource file (probably just a copy of "fr-FR" file). Thus the widget will be able to get those messages and localize the widget.

If you would like to change the localization messages, but preserve the internationalization settings then you can just change the uiCulture and keep the culture attribute unchanged (in the <globalization> tag).

If the problem still persists, I believe that the best way will be to send us a repro demo that shows the problem. Thus we will be able to review it locally and follow you up with more details.

Regards,
Georgi Krustev
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
Tags
Grid
Asked by
Laurent
Top achievements
Rank 1
Answers by
Laurent
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or