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

Possible wrong Polish localization

3 Answers 8 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
polarnet
Top achievements
Rank 1
polarnet asked on 05 Feb 2021, 02:47 PM

Hi, collegues

 

i do simple test multilanguage site and has possible trouble: use pl culture and calendar display dates in format dd.MM.yyyy. But ASP.Net Core 3.1 with Polish culture dont accept values in this format for DateTime.TryParse. Look at kendo.culture.pl.min.js and found format section:

patterns: { 
  d: "dd.MM.yyyy",
  D: "dddd, d MMMM yyyy", 
  F: "dddd, d MMMM yyyy HH:mm:ss", 
  g: "dd.MM.yyyy HH:mm",
  G: "dd.MM.yyyy HH:mm:ss",
  m: "d MMMM", 
  M: "d 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" 
}

but simple test with net console display for me:
Format:d, value: 2021-02-05
Format:D, value: 5 lutego 2021
Format:F, value: 5 lutego 2021 17:17:07
Format:g, value: 2021-02-05 17:17
Format:G, value: 2021-02-05 17:17:07
Format:m, value: 5 lutego
Format:M, value: 5 lutego
Format:s, value: 2021-02-05T17:17:07
Format:t, value: 17:17
Format:T, value: 17:17:07
Format:u, value: 2021-02-05 17:17:07Z
Format:y, value: luty 2021
Format:Y, value: luty 2021

I'm found this text: Poland adopted the ISO 8601 standard for date format in official, especially electronic, communication in 2002. For everyday usage and for less official papers, however, the traditional formats d.m.[yy]yy or dd.mm.[yy]yy (i.e., 7.8.2008, 07.08.2008, 07.08.08) are very common in Poland because of speaking order: "day month year".

I think, we have inconsistent behaviour in client and server parts.

 

 

PS I'm not Polish and can't told which format is correct.

Sincerelly yours,

3 Answers, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 10 Feb 2021, 01:05 PM

Hi Polarnet,

Thank you for the details provided.

I tried to replicate the faulty behavior and can confirm - you are totally correct. In this case, the formatting is not got from the culture but is using the default one. The translation is happening as expected, but the format needs to be set manually.

I created a sample project(attached) that describes the pointed implementation.

Furthermore, the following dojo example is demonstrating the implementation and behavior of the approach above:

Give the approach above a try and let me know if this scenario is a working one for the needs of your application, or further assistance is needed.


Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
polarnet
Top achievements
Rank 1
answered on 11 Feb 2021, 10:32 AM

Hi, Anton, thanks a lot for your assistance. I'm already resolve this trouble in my tests via custom model binder for datetime. Thanks again for your help.

Best wishes,

0
Anton Mironov
Telerik team
answered on 11 Feb 2021, 10:37 AM

Hi Polarnet,

I am glad to hear that the issue you were facing is now resolved.

I am closing this ticket thread now, as it could be re-opened whenever it is needed.

I further assistance is needed, do not hesitate to contact me and the team.

Best Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Calendar
Asked by
polarnet
Top achievements
Rank 1
Answers by
Anton Mironov
Telerik team
polarnet
Top achievements
Rank 1
Share this question
or