Localization of KetticWizard Control in C#.NET
KetticWizard control for Windows Forms provides the localizing support to display the text and message of this Wizard control in a specific language, so that the developers can deliver their application globally. Additionally, this control also provides the right to left languages support, which is capable of showing languages like Arabic, Persian, Urdu, and Hebrew. In the C# tutorial below, we shall demonstrate how to localize the KetticWizard for Windows applications.
Localize KetticWizard Control in Windows Forms
The following steps demonstrate how to localize the KetticWizard control to display text and messages in a specific language.
- Create a new project or open an existing one in your C# Windows Form application
- Use the namespace, Kettic.WinForms.UI.Localization, which include the complete localizing C# classes
- Create a descendant of the C# class KetticWizardLocalizationProvider in your .NET 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 behavior
- Implement a custom localization provider for localizing KetticWizard string with the C# code below
class MyWizardLocalizationProvider : KetticWizardLocalizationProvider
public override string GetLocalizedString(string id)
case KetticWizardStringId.BackButtonText: return "< Back";
case KetticWizardStringId.NextButtonText: return "Next >";
case KetticWizardStringId.CancelButtonText: return "Cancel";
case KetticWizardStringId.FinishButtonText: return "Finish";
default: return string.Empty;
- After the implementation of the custom localization provider, we can apply it through instantiating and assigning it to the current localization provider. The following C# code shows how to achieve this.
KetticWizardLocalizationProvider.CurrentProvider = new MyWizardLocalizationProvider();
Right-to-left Support by KetticWizard for WinForms
KetticWizard control provides right to left support to display content from the right side to left side in specific languages like Arabic. This is achieved by enabling the RightToLeft property of the KetticWizard control.
this.ketticLabel1.RightToLeft = RightToLeft.Yes;
this.ketticLabel1.Text = "KetticWizard Welcome page";