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

ColumnMenu localization

3 Answers 141 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michel
Top achievements
Rank 1
Michel asked on 24 Apr 2017, 04:08 PM

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.

3 Answers, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 26 Apr 2017, 10:33 AM
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.
0
Michel
Top achievements
Rank 1
answered on 02 May 2017, 08:18 AM

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.

0
Alex Hajigeorgieva
Telerik team
answered on 03 May 2017, 10:29 AM
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 (charts) and form elements.
Tags
Grid
Asked by
Michel
Top achievements
Rank 1
Answers by
Alex Hajigeorgieva
Telerik team
Michel
Top achievements
Rank 1
Share this question
or