ColumnMenu localization

4 posts, 0 answers
  1. Michel
    Michel avatar
    44 posts
    Member since:
    Sep 2011

    Posted 24 Apr Link to this post

    Is there a way to localize SubMenu in Filter part of the ColumnMenu and in a more general way to localize all the ColumnMenu content.

    It seem's that :

        <script src="~/lib/kendo/js/cultures/kendo.culture.fr-FR.min.js"
                type="text/javascript"></script>
       <script type="text/javascript">
        kendo.culture('fr-FR');
      </script>

    has no effect, it is still in English.

    Best regards.

  2. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    319 posts

    Posted 26 Apr Link to this post

    Hi Michel,

    The Kendo UI Grid column messages that we have in our distribution at present are available at:

    https://github.com/telerik/kendo-ui-core/blob/master/src/messages/kendo.messages.fr-FR.js#L94

    I have tested using the Kendo UI french localisation messages in a filterable, sortable Kendo UI Grid with a column menu and it seems to be working as expected on my end:

    http://dojo.telerik.com/UYuxa

    However, if you prefer to change the messages, you may use the columnMenu messages configuration settings as shown in the overview article of the grid at:

    http://docs.telerik.com/kendo-ui/controls/data-management/grid/localization#menu

    Regards,
    Alex Hajigeorgieva
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Michel
    Michel avatar
    44 posts
    Member since:
    Sep 2011

    Posted 02 May in reply to Alex Hajigeorgieva Link to this post

    Thank you for your reply.

    After investigations I noticed that in my Layout.cshtml the US messages are after the French.

            <script src="~/lib/kendo/js/messages/kendo.messages.fr-FR.min.js"></script>
            <script src="~/lib/kendo/js/messages/kendo.messages.en-US.min.js"></script>

    I've done that because if the user is running a US Browser session, it will be in English and if the user is running a FR session it will be in French (assuming that in my razor view I pick up the current culture).

    This mechanism work for me on another app with grid or other control but I have never tried it with the ColumnMenu.

    About the customization of the messages in the article. It could be interesting but as I'm using MVC for declaring the Grid. It could be a little tricky to add it in the declaration of the Grid. Need perhaps to add some JavaScript Code in the RazorView.

  4. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    319 posts

    Posted 03 May Link to this post

    Hi Michel,

    The UI for ASP.NET MVC wrappers have a GridColumnMenuSettingsBuilder which can be utilised to alter the messages with Razor syntax. Scroll to the bottom of the page to find it:

    Messages(System.Action<Kendo.Mvc.UI.Fluent.ColumnMenuMessagesBuilder>)

    http://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/GridColumnMenuSettingsBuilder

    It is important to note that the wrappers will render some of the HTML on the server and some of it on the client. This is the most common cause for a widget which is partly localised. The recommended approach is to match the server and client cultures:

    http://docs.telerik.com/aspnet-mvc/getting-started/globalization#match-cultures

    Kind Regards,
    Alex Hajigeorgieva
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top