C# 4.0 如何本地化DotNetBar日期选择器?

C# 4.0 如何本地化DotNetBar日期选择器?,c#-4.0,datepicker,dotnetbar,C# 4.0,Datepicker,Dotnetbar,如何本地化dotnebar的DatePicker组件以显示本地化日历 即使更改输入语言,它仍然显示英文日历。 解决方案是什么?您只需要为LocalizationKeys.LocalizationString静态事件添加处理程序 下面是一个本地化DateTimeInput控件文本的示例 在静态void Main()方法中 你可以在这里查阅官方文件 您只需要为LocalizationKeys.LocalizeString静态事件添加处理程序 下面是一个本地化DateTimeInput控件文本的示例

如何本地化
dotnebar
DatePicker
组件以显示本地化日历

即使更改输入语言,它仍然显示英文日历。
解决方案是什么?

您只需要为LocalizationKeys.LocalizationString静态事件添加处理程序

下面是一个本地化DateTimeInput控件文本的示例

在静态void Main()方法中


你可以在这里查阅官方文件

您只需要为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;
    }