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

RadDatePicker: how can we change the culture on-the-fly?

2 Answers 172 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Jane
Top achievements
Rank 1
Jane asked on 15 Jan 2010, 11:25 PM

From the example code, we see that we can change the culture in Xaml

 

 

 

<telerikInput:RadDatePicker x:Name="datePicker" HorizontalAlignment="Left" Margin="10" Width="200" Culture="en-US" />
we can change Culture as any language in the drop down list such as chinese:

 

 

 

<telerikInput:RadDatePicker x:Name="datePicker" HorizontalAlignment="Left" Margin="10" Width="200" Culture="Chinese (People's Republic of China)" />

 

 

 

We need to change the culture on-the-fly. Can we do it on the Xaml?
If not, we have to do it through code-behind.
How do we get the list of culture list as above string?
thx!
Jane

2 Answers, 1 is accepted

Sort by
0
Jane
Top achievements
Rank 1
answered on 15 Jan 2010, 11:45 PM
It looks like we can use the Culture Name.
for an example, for German: datePicker.Culture = new CultureInfo("de-DE"); in the code behind.
Jane

 

0
Konstantina
Telerik team
answered on 20 Jan 2010, 05:28 PM
Hello Jane,

Thank you for contacting us.

This is the right way to set the culture of the DatePicker. You can find list with culture codes here.
Hope this helps.

If you have further questions please feel free to contact us again.

Sincerely yours,
Konstantina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
DatePicker
Asked by
Jane
Top achievements
Rank 1
Answers by
Jane
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or