New to Telerik UI for WinFormsStart a free 30-day trial

Localizing Scheduler Navigator

Updated over 6 months ago

The RadSchedulerNavigator control uses the SchedulerNavigatorLocalizationProvider class to define the default values for all strings that are displayed to the user.  You can easily override the default localization by inheriting from the SchedulerNavigatorLocalizationProvider class and override its GetLocalizedString method:

Custom Localization Provider

C#
public class CustomSchedulerNavigatorLocalizationProvider : SchedulerNavigatorLocalizationProvider
{
    public override string GetLocalizedString(string id)
    {
        switch (id)
        {
            case SchedulerNavigatorStringId.DayViewButtonCaption:
                {
                    return "Day View";
                }
            case SchedulerNavigatorStringId.WeekViewButtonCaption:
                {
                    return "Week View";
                }
            case SchedulerNavigatorStringId.MonthViewButtonCaption:
                {
                    return "Month View";
                }
            case SchedulerNavigatorStringId.TimelineViewButtonCaption:
                {
                    return "Timeline View";
                }
            case SchedulerNavigatorStringId.AgendaViewButtonCaption:
                {
                    return "Agenda View";
                }
            case SchedulerNavigatorStringId.ShowWeekendCheckboxCaption:
                {
                    return "Show Weekend";
                }
            case SchedulerNavigatorStringId.TodayButtonCaptionToday:
                {
                    return "Today";
                }
            case SchedulerNavigatorStringId.TodayButtonCaptionThisWeek:
                {
                    return "This week";
                }
            case SchedulerNavigatorStringId.TodayButtonCaptionThisMonth:
                {
                    return "This month";
                }
            case SchedulerNavigatorStringId.SearchInAppointments:
                {
                    return "Search In Appointments";
                }
        }
        return String.Empty;
    }
}

In order to utilize the new Localization Provider, you should create an instance of the new provider and assign it to the static CurrentProvider property of SchedulerNavigatorLocalizationProvider class:

Change the Current Provider

C#
SchedulerNavigatorLocalizationProvider.CurrentProvider = new CustomSchedulerNavigatorLocalizationProvider();

See Also

In this article
See Also
Not finding the help you need?
Contact Support