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

Broken Globalization - Wrong Culture

9 Answers 295 Views
Globalization
This is a migrated thread and some comments may be shown as answers.
Anibal
Top achievements
Rank 1
Anibal asked on 06 Apr 2012, 11:13 PM

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

9 Answers, 1 is accepted

Sort by
0
Ileana
Top achievements
Rank 1
answered on 10 Apr 2012, 10:21 AM
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



0
Anibal
Top achievements
Rank 1
answered on 10 Apr 2012, 11:24 AM

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


0
Georgi Krustev
Telerik team
answered on 10 Apr 2012, 12:14 PM
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!
0
Anibal
Top achievements
Rank 1
answered on 10 Apr 2012, 12:54 PM

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
0
Anibal
Top achievements
Rank 1
answered on 10 Apr 2012, 01:00 PM
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);

 
"dd MMMM yyyy"
"dd MMMM yyyy HH:mm:ss"
"dd/MM/yyyy HH:mm:ss"
"dd MMMM"
"HH:mm:ss"
"MMMM yyyy"
"dd/MM/yyyy"
"dd/MM/yyyy HH:mm"
"dd MMMM"
"yyyy'-'MM'-'dd'T'HH':'mm':'ss"
"HH:mm"
"yyyy'-'MM'-'dd HH':'mm':'ss'Z'"
"MMMM yyyy"
0
Lee
Top achievements
Rank 1
answered on 10 Apr 2012, 05:56 PM
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
0
Accepted
Georgi Krustev
Telerik team
answered on 11 Apr 2012, 08:49 AM
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!
0
Anibal
Top achievements
Rank 1
answered on 11 Apr 2012, 12:48 PM

I've double checked. You are right.

I was expecting to find the en-GB with the same definition than en-US:
 
"dddd, MMMM dd, yyyy"
"dddd, MMMM dd, yyyy h:mm:ss tt"
"M/d/yyyy h:mm:ss tt"
"MMMM dd"
"h:mm:ss tt"
"MMMM, yyyy"
"M/d/yyyy"
"M/d/yyyy h:mm tt"
"MMMM dd"
"yyyy'-'MM'-'ddTHH':'mm':'ss"
"h:mm tt"
"yyyy'-'MM'-'dd HH':'mm':'ss'Z'"
"MMMM, yyyy"

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

Thanks,
Anibal
0
T3DdYBeR57
Top achievements
Rank 1
answered on 11 Apr 2012, 01:04 PM
good
Tags
Globalization
Asked by
Anibal
Top achievements
Rank 1
Answers by
Ileana
Top achievements
Rank 1
Anibal
Top achievements
Rank 1
Georgi Krustev
Telerik team
Lee
Top achievements
Rank 1
T3DdYBeR57
Top achievements
Rank 1
Share this question
or