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

[Solved] DateTimePicker CultureUIInfo

3 Answers 136 Views
DatePicker for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Haimo
Top achievements
Rank 1
Haimo asked on 15 Feb 2013, 09:43 AM
Hi,

the UI of DateTimePicker (format, text translations) depends on the selected "Default Language" in Package.appxmanifest. This works fine!
In my app the user can change the language from eg. english to german 
Q: How can I change the CultureUIInfo to show e.g. the time as "02 10 PM" instead of "14 10" ?

Thanks for you answer

Haimo

3 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 20 Feb 2013, 10:16 AM
Hello Haimo,

Thank you for your interest.

DatePicker uses DefaultUICulture to formats the displayed date. Thus in order to modify it you can take advantage of ApplicationLanguages properties. For example:
ApplicationLanguages.PrimaryLanguageOverride = "de";


I hope this helps.Let me know if you have any other questions regarding our controls.




 

All the best,
Ivaylo Gergov
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Haimo
Top achievements
Rank 1
answered on 20 Feb 2013, 02:22 PM
Ivaylo,
thanks for your answer!

I tried to change the language while the program was running - no chance, it dosen't work!
Now I do in App():
  ApplicationLanguages.PrimaryLanguageOverride = GlobalizationPreferences.Languages[0]; 
... and the DateTimePicker is in the correct Format.

Haimo
0
Tsvyatko
Telerik team
answered on 22 Feb 2013, 09:54 AM
Hi Haimo,

Unfortunately, using PrimaryLanguageOverride will work only if set in App constrictor. We are currently considering providing independent flexible mechanism to control the culture used per control instance. It would be similar to our LocalizarionManager. While we do not have fixed time frame foe this we consider this feature with high priority, so it can be expected for one of the next few official releases.

Kind regards,
Tsvyatko
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
DatePicker for XAML
Asked by
Haimo
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Haimo
Top achievements
Rank 1
Tsvyatko
Telerik team
Share this question
or