Localization not working

6 posts, 0 answers
  1. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 05 Jun 2018 Link to this post

    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

     

     

     

     

     

  2. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 06 Jun 2018 in reply to Peter Link to this post

    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

     

  3. Stefan
    Admin
    Stefan avatar
    3008 posts

    Posted 07 Jun 2018 Link to this post

    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.
  4. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 07 Jun 2018 in reply to Stefan Link to this post

    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

     

     

     

  5. Stefan
    Admin
    Stefan avatar
    3008 posts

    Posted 08 Jun 2018 Link to this post

    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.
  6. Peter
    Peter avatar
    97 posts
    Member since:
    May 2016

    Posted 15 Jun 2018 in reply to Stefan Link to this post

    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

     

Back to Top