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

Kendo ASP.NET Core Grid Default Language

1 Answer 269 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jacek
Top achievements
Rank 1
Jacek asked on 17 May 2017, 01:11 PM

On my developer machine i have polish language system, but i need to develop all pages in english. I am working with Sample Telerik C# ASP.NET Core MVC Application.
My Razor code is currently:

<p>CurrentCulture: @Html.Raw(System.Globalization.CultureInfo.CurrentCulture.ToString())</p>
<p>CurrentUICulture: @Html.Raw(System.Globalization.CultureInfo.CurrentUICulture.ToString())</p>
@(Html.Kendo().Grid<TelerikAspNetCoreApp2.Models.OrderViewModel>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.OrderID).Filterable(false);

...

    })
    .Groupable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Read(read => read.Action("Orders_Read", "Grid"))
    )
)

 

HTML result is:

<p>CurrentCulture: en-US</p>
<p>CurrentUICulture: en-US</p>
<div id="grid" name="grid"></div><script>kendo.syncReady(function(){jQuery("#grid").kendoGrid({"groupable":{"enabled":true,"messages":{
"empty":"Przeciągnij nagłówek kolumny i upuść go tutaj aby pogrupować według tej kolumny"}},"columns":[{"title":"Order ID","field":"OrderID","filterable":false,"encoded":true},{"title":"Freight","field":"Freight","filterable":{"messages":{"info":"Pokaż wiersze o wartościach które","isTrue":"prawda","isFalse":"fałsz","filter":"Filtr","clear":"Wyczyść filtr","and":"Oraz","or":"lub","selectValue":"-Wybierz wartość-","value":"Wartość","cancel":"Anuluj","selectedItemsFormat":"{0} selected items"} ....

 

HTML Rendered code contains valid Culture Info=en-US, but Kendo Grid messages are in polish language. How to force Kendo to use English language? Is it also possible to disable this messages? I would like to have short javascript as it is in pure Kendo JS.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 22 May 2017, 10:29 AM
Hello Jacek,

Removing the messages will create a scenario where the text undefined will apper instead, and this may not be the desired result.

Still, the messages can be customised as desired:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-filterable.messages

(Syntax for ASP.NET Core MVC)

http://docs.telerik.com/aspnet-mvc/api/Kendo.Mvc.UI.Fluent/FilterableMessagesBuilder#kendomvcuifluentfilterablemessagesbuilder

I hope this is helpful.

Regards,
Stefan
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
Jacek
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or