$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Scheduler control for Windows Forms
Create rich Outlook style functionality and add rich scheduling interfaces to C# Windows application
Home > WinForms UI Controls > User Manual > Localize Translate Strings in Scheduler in C#

C# Translating Strings of KetticScheduler in .NET

KetticScheduler WinForms control allows the developers easily access and customize the localization of it to a specific language. With the localization support, developers can create .NET Windows applications that can show text and messages in the language used by the users of their application. The following is the C# tutorial that shows how to access KetticScheduler control and localize this component in .NET application.

Tutorial on Localizing Strings in KetticScheduler for C#.NET

KetticScheduler control supports localization, which allows the developers to show text and message of this control for WinForms in a specific language so that they can globally deliver their application. The following steps demonstrate the localization.
  • Create a new project or open an existing one in your Windows Form application
  • Use the namespace, Kettic.WinForms.UI.Localization, which include the complete localizing C# classes
  • Create a descendant of the C# class KetticSchedulerLocalizationProvider in your project
  • Override the GetLocalizedString() method, and then provide a translation for the messages
  • When translation message was not offered, this method will return the default value
  • Call to the base GetLocalizedString method in the default clause of the switch statement to guarantee the behavour
  • Implement a custom localization provider with the C# code below

public class CustomSchedulerLocalizationProvider : KetticSchedulerLocalizationProvider
{
public override string GetLocalizedString(string id)
{
switch (id)
{
case KetticSchedulerStringId.Appointment:
return "Appointment";
case KetticSchedulerStringId.AppointmentDialogRecurrence:
return "Recurrence";
case KetticSchedulerStringId.RecurrenceDialogYearly:
return "Yearly";
case KetticSchedulerStringId.RecurrenceDialogMonthly:
return "Monthly";
case KetticSchedulerStringId.RecurrenceDialogWeekly:
return "Weekly";
case KetticSchedulerStringId.RecurrenceDialogDaily:
return "Daily";
case KetticSchedulerStringId.RecurrenceDialogEndBy:
return "End by:";
case KetticSchedulerStringId.RecurrenceDialogEndAfter:
return "End after:";
case KetticSchedulerStringId.TimeZoneLocal:
return "Local";
}

return string.Empty;
}
}
  • After the implementation of the custom localization provider, we can apply it by instantiating and assigning it to the current localization provider. The following C# code shows how to achieve this.

KetticSchedulerLocalizationProvider.CurrentProvider = new CustomSchedulerLocalizationProvider();
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls