Broken Globalization - Wrong Culture

10 posts, 1 answers
  1. Anibal
    Anibal avatar
    6 posts
    Member since:
    Feb 2012

    Posted 06 Apr 2012 Link to this post


    If I load en-GB, I get a mixed current culture.

    <script src="/components/com_hellokendo/js/jquery.min.js" type="text/javascript">
    </script> <script src="/components/com_hellokendo/js/kendo.all.min.js" type="text/javascript"></script> <script src="/components/com_hellokendo/js/cultures/kendo.culture.en-GB.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    kendo.culture("en-GB");
    </script>
    
    cultures.current Object { name="en-GB" ... calendars ... patternsObject { d="dd/MM/yyyy" WRONG

    Which is the problem?, it seems to be loading the second culture or my browser localization.

    Thanks,
    Anibal
  2. Ileana
    Ileana avatar
    1 posts
    Member since:
    Apr 2012

    Posted 10 Apr 2012 Link to this post

    I have the same problem, I'll keep watching the thread, if you find the solution by yourself, be so kind to share it, please!

    _______________
    My site



  3. Kendo UI is VS 2017 Ready
  4. Anibal
    Anibal avatar
    6 posts
    Member since:
    Feb 2012

    Posted 10 Apr 2012 Link to this post


    Hi Ileana,

    The code is very simple, so I think it's a Kendo bug in the Globalization.

    It's seems to be mixing Browser Culture with Kendo Culture.

    Thanks,
    Anibal


  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 10 Apr 2012 Link to this post

    Hi,

     
    I believe that everything works as expected. Here is the "en-GB" script which is set as default culture in this jsFiddle demo. It seams that everything is ok. Could you please point me where exactly is the problem?

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Anibal
    Anibal avatar
    6 posts
    Member since:
    Feb 2012

    Posted 10 Apr 2012 Link to this post


    Hi Georgi,

    I've run the example according the documentation. However, the current culture is a mix of the Browser Culture (spanish) and the Kendo Culture object (english).

    I've posted the example, where you can see the en-GB current culture with a spanish date pattern:

    cultures.current Object { name="en-GB" ... calendars ... patternsObject { d="dd/MM/yyyy"


    Regards,
    Anibal
  7. Anibal
    Anibal avatar
    6 posts
    Member since:
    Feb 2012

    Posted 10 Apr 2012 Link to this post

    This is my output from the jsfiddle demo, where it's reproduced the same problem between en-GB and es-ES browser:

    kendo.culture("en-GB");
    var culture = kendo.culture();
    console.log(culture.calendars.standard.patterns);

     
  8. Lee
    Lee avatar
    1 posts
    Member since:
    Apr 2012

    Posted 10 Apr 2012 Link to this post

    Been searching for a solution to this same problem. Will be following this thread too. Pls give us updates on this... Thank you so much!

    _________________

    The INA Team
  9. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 11 Apr 2012 Link to this post

    Hi Anibal,

     
    Here are the dates from the en-GB script:

    patterns: {
                        d: "dd/MM/yyyy",
                        D: "dd MMMM yyyy",
                        F: "dd MMMM yyyy HH:mm:ss",
                        g: "dd/MM/yyyy HH:mm",
                        G: "dd/MM/yyyy HH:mm:ss",
                        m: "dd MMMM",
                        M: "dd MMMM",
                        s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
                        t: "HH:mm",
                        T: "HH:mm:ss",
                        u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
                        y: "MMMM yyyy",
                        Y: "MMMM yyyy"
                    },
    I think they are equal to the ones you got using console.log.

    Here are the patterns from the es-ES script:
    patterns: {
                        d: "dd/MM/yyyy",
                        D: "dddd, dd' de 'MMMM' de 'yyyy",
                        F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
                        g: "dd/MM/yyyy H:mm",
                        G: "dd/MM/yyyy H:mm:ss",
                        m: "dd MMMM",
                        M: "dd MMMM",
                        s: "yyyy'-'MM'-'dd'T'HH':'mm':'ss",
                        t: "H:mm",
                        T: "H:mm:ss",
                        u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
                        y: "MMMM' de 'yyyy",
                        Y: "MMMM' de 'yyyy"
                    },

    I still believe that the patters you got are the correct ones.

    Kind regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  10. Anibal
    Anibal avatar
    6 posts
    Member since:
    Feb 2012

    Posted 11 Apr 2012 Link to this post


    I've double checked. You are right.

    I was expecting to find the en-GB with the same definition than en-US:
     

    Source: http://en.wikipedia.org/wiki/Date_format_by_country

    Thanks,
    Anibal
  11. T3DdYBeR57
    T3DdYBeR57 avatar
    1 posts
    Member since:
    Apr 2012

    Posted 11 Apr 2012 Link to this post

    good
Back to Top
Kendo UI is VS 2017 Ready