Hi,
I'm creating a custom localization manager, because my Culture is not supported and my client want to have everything in native language. LocalizationManager with
public override string GetStringOverride(string key)
{
switch (key)
{
}
return base.GetStringOverride(key);
}
is a great and simple tool to use. But I need some keys, which are not mentioned in telerik documentation. Currently I need those for week days and month names. Can you provide them please?
Best regards
10 Answers, 1 is accepted

To change the mentioned strings you can set the Culture property of the RadDateTimePicker. Check the following code snippet.
public
MainWindow()
{
InitializeComponent();
this
.datePicker.Culture =
new
System.Globalization.CultureInfo(
"fr-FR"
);
}
Regards,
Dinko
Progress Telerik

Eh,
I will quote myself with bold now:
my Culture is not supported(...)
You can take a look at this MSDN help article which describes the supported cultures.
Regards,
Dinko
Progress Telerik

Hi Dinko,
Thank you for your answer, telerik documentation for Localization is quite different than msdn one, I'm familliar with both, does msdn affects datepicker only? Or there are more controlls in which I can base on msdn instead of telerik Culture property?
Regards
There are several controls in our UI for WPF suite which use windows Localization strings. If you want to change the week and months name you can set custom string arrays for the current culture. Check the following code snippet.
this
.datePicker.Culture =
new
System.Globalization.CultureInfo(
"en-US"
);
this
.datePicker.Culture.DateTimeFormat.AbbreviatedDayNames =
new
string
[] {
"111"
,
"222"
,
"33"
,
"44"
,
"555"
,
"666"
,
"777"
};
this
.datePicker.Culture.DateTimeFormat.AbbreviatedMonthNames =
new
string
[] {
"111"
,
"222"
,
"33"
,
"44"
,
"555"
,
"666"
,
"777"
,
"888"
,
"999"
,
"1010"
,
"1111"
,
"12121"
,
"13131"
};
this
.datePicker.Culture.DateTimeFormat.MonthNames =
new
string
[] {
"111"
,
"222"
,
"33"
,
"44"
,
"555"
,
"666"
,
"777"
,
"888"
,
"999"
,
"1010"
,
"1111"
,
"12121"
,
"13131"
};
Give this approach a try and let me know if it works for you.
Regards,
Dinko
Progress Telerik

Hi Dinko,
I was so excited about this approach, but, sadly, it doesn't work for me. Placed this code after InitializeComponent(); and it changed nothing.
Regards
I am attaching a sample project which demonstrates the approach explained in my previous approach. When you run the application open the drop-down content of the control. You can observe that the week names in the calendar are changed.
Regards,
Dinko
Progress Telerik


Just in case somebody happens to end up here while searching for a way around the stupid single letter weekday abbreviations showing up with recent skins: There is also a ShortestDayNames attribute which can be reset to sensible names:
var ci = new CultureInfo("de-DE") {
DateTimeFormat = {ShortestDayNames = new[] {"So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"}}
};
Calendar.Culture = ci;