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

Localization strings for datetimepicker

4 Answers 151 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Auvo
Top achievements
Rank 1
Auvo asked on 27 Jul 2011, 07:40 AM
Hi,

What are the localization strings to datetimepicker - navigation popup controls (Close-button, Clock) ?

I'm using RadControls for WPF (WPF40_2011_2_0712)

Regards,
Auvo

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 28 Jul 2011, 10:46 AM
Hi Auvo,

Localization of RadDateTimePicker is in our ToDo list, you can vote for it and track its progress here.

For now, you can localize the DateTimeWatermarkContent as explained here.

Regards,
Yana
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Pavel
Top achievements
Rank 1
answered on 23 Aug 2011, 08:50 PM
Hi,
Until the
team solves the hard problem with the own hardcoded strings I suggest a workaround
public class DateTimePickerEx : RadDateTimePicker
{
    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();
        var clockPicker = GetTemplateChild("PART_Clock") as DateTimePickerClock;
        if (clockPicker != null)
            clockPicker.Header = RM.GetString("Clock");
        var btnClose = GetTemplateChild("PART_Close") as RadToggleButton;
        if (btnClose != null)
            btnClose.Content = RM.GetString("Close");
    }
}
Best Regards,
Pavel
0
Sylvain
Top achievements
Rank 1
answered on 03 Dec 2014, 05:55 PM
Has the localization for the WPF RadDateTimePicker control been done since this post (2011) ?

I need to set the calendar permanently to French in my application instead of relying on the user's environnement. Do you have a step-by-step example of how to do that in VB ?  Thanks.
0
Yana
Telerik team
answered on 04 Dec 2014, 09:48 AM
Hello Sylvain,

Yes, RadDateTimePicker provides localization ( you could check here for details), additionally since French is one of the languages we have built-in support for, all you need to do is to set CurrentCulture and CurrentUICulture of the CurrentThread like this:

Thread.CurrentThread.CurrentCulture = New CultureInfo("fr")
Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr")

Hope this helps.

Regards,
Yana
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
DateTimePicker
Asked by
Auvo
Top achievements
Rank 1
Answers by
Yana
Telerik team
Pavel
Top achievements
Rank 1
Sylvain
Top achievements
Rank 1
Share this question
or