如何本地化DotNetBar的DatePicker组件以显示本地化的日历?
即使更改输入语言,它仍然显示英语日历。解决方案是什么?
发布于 2017-07-09 11:01:57
您只需要为LocalizationKeys.LocalizeString静态事件添加处理程序。
下面是一个本地化DateTimeInput控件文本的示例。
在静态void Main()方法中,
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;
}你可以在这里参考官方文档。http://www.devcomponents.com/kb2/?p=523
https://stackoverflow.com/questions/32579711
复制相似问题