Globalization on Kendo grid

3 posts, 0 answers
  1. Laurent
    Laurent avatar
    11 posts
    Member since:
    Mar 2014

    Posted 13 Jul 2015 Link to this post

    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. Laurent
    Laurent avatar
    11 posts
    Member since:
    Mar 2014

    Posted 13 Jul 2015 in reply to Laurent Link to this post

    If I watch the kendo variable with my browser while running the application, I've got two cultures attached to the Kendo Grid
  3. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3747 posts

    Posted 15 Jul 2015 Link to this post

    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
Back to Top