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

Localization not working

5 Answers 690 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 05 Jun 2018, 05:04 PM

Hi,

I modified https://demos.telerik.com/kendo-ui/grid/remote-data-binding for culture("de-DE"):

From https://docs.telerik.com/kendo-ui/framework/globalization/overview I appended:

  <script type="text/javascript">
    kendo.culture("de-DE");
  </script>

see http://dojo.telerik.com/iToGuVUH

But it has no effect. The dateformat is US (month first) and the filter dialog is english.

Where is the error?

Peter

 

 

 

 

 

5 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 06 Jun 2018, 09:22 PM

Hi, I just see, that the decimal numbers in column Freight are missinterpreted by using kendo.culture("de-DE"):

Without kendo.culture("de-DE") the first correct values:

32.38 11.61 65.83 41.34 51.3 58.17 22.98 148.33 13.97 81.91 140.51 3.25

With kendo.culture("de-DE") integers are shown:

3238 1161 6583 4134 5130 5817 2298 14833 1397 8191 14051 325

The numbers are multiplied with 100, see OrderID 10291 on page 3: 6.4  => 640

The setting of kendo.culture() should not change the reading of remote data (xml, json) which has always the dot decimal seperator.

Peter

 

0
Stefan
Telerik team
answered on 07 Jun 2018, 06:48 AM
Hello, Peter,

Thank you for the details.

Regarding the issues.

1) Dates not affected by the culture- this occurs as there is a specific set format for the dates which is with higher priority. If a more generic format is set, the culture will take effect:

http://dojo.telerik.com/iToGuVUH/2

2) Numbers are modified- this occurs as the service actually returns strings instead of numbers and the string contains dot instead of a comma. If standard numbers send the Grid will format them accordingly. In this case, the Localization is working as expected, just the service is not sending proper data, and we do apologize for that:

https://dojo.telerik.com/iXAleVeP

Let me know if you need additional information on this matter.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Peter
Top achievements
Rank 1
answered on 07 Jun 2018, 07:37 AM

Hello Stefan,

thank you for the answer: 2) ok, is a problem of the server service.

1) Order Date format: my mistake, I didn't see the the specific format in the column specification.

But how can I force the grid to output german strings/messages? ie.

footer line: 1 - 20 of 830 "items" -> Einträge 1 - 20 von 830

filter dialogs: "Show items with value that:" => "Zeilen mit Werten anzeigen, die", dropdownlist entries, ...

Best regards,

Peter

 

 

 

0
Stefan
Telerik team
answered on 08 Jun 2018, 07:27 AM
Hello, Peter,

The messages are controlled by a separate file for the messages:

ttps://docs.telerik.com/kendo-ui/framework/localization/overview#configuration-Set

https://demos.telerik.com/kendo-ui/grid/localization

The culture file is controlling the formatting and the messages file is for the messages.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Peter
Top achievements
Rank 1
answered on 15 Jun 2018, 11:34 AM

Hi Stefan,

thank you. Solution:

<script src="../js/cultures/kendo.culture.de-DE.min.js"></script>
<script src="../js/messages/kendo.messages.de-DE.min.js"></script>
<script type="text/javascript">
kendo.culture("de-DE");
</script>

 

 

Peter

 

Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or