$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Windows Forms Time Picker Control
Create interactive time UI experience for your windows forms C# applications.
Home > WinForms UI Controls > User Manual > Time Picker Localization in C#

Localization of C# Time Picker

The Kettic Time Picker control allows users easily access and customize the localization of the control to a specific language. With the localization support, developers can build Windows Forms applications that can show text and messages in the language used by the users of the application. The following is the C# tutorial that shows how to access the Time Picker control and set the localization.

How to Set Localization of Time Picker Control

  • C# classes for localizing the time picker control are included in the namespace, Kettic.WinForms.UI.Localization.
  • To localize the Time Picker control, create a descendant of the class, TimePickerLocalizationProvider, in your .NET Windows Forms project first.
  • Offer a translation for the label and user messages to override the method, GetLocalizedString(string id).
  • The default value will be returned if a translation is not offered.
  • Call the method, GetLocalizedString, in the default clause of the switch statement to guarantee the behavior.
  • The following is the C# code snippet that shows how to implement an English localization provider

class MyTimePickerLocalizationProvider : KetticTimePickerLocalizationProvider
{
public override string GetLocalizedString(string id)
{
switch (id)
{
case KetticTimePickerStringId.HourHeaderText: return "Hours";
case KetticTimePickerStringId.MinutesHeaderText: return "Minutes";
case KetticTimePickerStringId.CloseButtonText: return "Close";
default: return string.Empty;
}
}
}
Instantiate, assign the custom localization provider to the current localization provider

KetticTimePickerLocalizationProvider.CurrentProvider = new MyTimePickerLocalizationProvider();
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