How to localize the DatePicker
component of the DotNetBar
to show a localized Calendar?
Even when changing the input language, it still shows the English calendar. What's the solution?
How to localize the DatePicker
component of the DotNetBar
to show a localized Calendar?
Even when changing the input language, it still shows the English calendar. What's the solution?
You just need to add handler for LocalizationKeys.LocalizeString static event.
Below is an example to localize the text for DateTimeInput control.
In your static void Main() method,
DevComponents.DotNetBar.LocalizationKeys.LocalizeString += new DotNetBarManager.LocalizeStringEventHandler(LocalizeString);
private static void LocalizeString(object sender, LocalizeEventArgs e)
{
if (e.Key == LocalizationKeys.MonthCalendarTodayButtonText)
{
e.LocalizedValue = Properties.Resources.MonthCalendarTodayButtonText;
}
if (e.Key == LocalizationKeys.MonthCalendarClearButtonText)
{
e.LocalizedValue = Properties.Resources.MonthCalendarClearButtonText;
}
e.Handled = true;
}
You can refer to official docs here. http://www.devcomponents.com/kb2/?p=523