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

Bug: Thread culture setting is not respected

5 Answers 92 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
hwsoderlund
Top achievements
Rank 1
hwsoderlund asked on 19 Jan 2011, 02:38 PM
The thread culture is not respected for the day names, time slots etc. See the attached screen shot (Swedish culture, day names appear in English). It works fine for the date/time pickers in the edit form though.

5 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 19 Jan 2011, 04:30 PM
Hi Henrik,

I was also expecting the Thread.CurrentCulture to be respected, but it seems that it isn't for all elements that rely on bindings to display culture dependent text. For example, the following does not work either:
<TextBlock Text="{Binding AppointmentsSource[0].Start, ElementName=UserControl}"  Grid.Row="1"/>

Where AppointmentsSource is a property of type ObservableAppointmentCollection in the UserControl (RadScheduleView.AppointmentsSource is bound to the same collection in my test app).

I was able to change the format in the bindings using the xml:lang attribute, but it is not easy to change at runtime:
<UserControl xml:lang="nl-nl" ... >

As far as I know, this behavior is by design for the Silverlight runtime.

The date pickers and the "current date" label in RadScheduleView work because the strings are formatted in the code-behind using the CurrentCulture as parameter.

All the best,
Valeri Hristov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
hwsoderlund
Top achievements
Rank 1
answered on 19 Jan 2011, 05:52 PM
Ok. With all due respect, I don't think that is good enough. This has never been a problem with RadScheduler, and since RadScheduleView is meant to be a replacement for RadScheduler, I really think the new component has to do everything that the old one did, and hopefully better. Surely you cannot be planning to release an all-new version of a scheduling component that only works correctly in the US, especially when the old one was fully localizable? You say that "this is the default behaviour of Silverlight". That may be true, but in this case I think Silverlight is wrong.

Also, I just checked the WPF demo, and that adapts fine to the Swedish culture setting. So the question is; is Silverlight or WPF "right"?

Anyway, this has to be an easy fix. Just let the DateTime values go through a converter or something, and set the display format there according to the thread culture.

Best regards,
/Henrik
0
Accepted
Valeri Hristov
Telerik team
answered on 20 Jan 2011, 04:06 PM
I agree this is not good enough. We will update this functionality for the official release, but with the current state of the control, this is the best that you could do.

Best wishes,
Valeri Hristov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
hwsoderlund
Top achievements
Rank 1
answered on 20 Jan 2011, 05:01 PM
Ok, I understand. That is fine. I got the impression you were not going to do anything about it. Sorry. :)
0
Valeri Hristov
Telerik team
answered on 20 Jan 2011, 05:02 PM
No problem :)

All the best,
Valeri Hristov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
ScheduleView
Asked by
hwsoderlund
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
hwsoderlund
Top achievements
Rank 1
Share this question
or