$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
PageView .NET Component
Create slick looking tab strip or panel, overlapping tabs, organize content, insert images into items
Home > WinForms UI Controls > User Manual > Localization of PageView Control in C#

C# Localizing KetticPageView Control

KetticPageView WinForms control supports localization and allows the users to customize the PageView component within their applications to display text and messages in a specific language. The localization of KetticPageView can be easily accomplished by using the localization C# classes which are defined in the Kettic.WinForms.UI.Localize namespace. This C# tutorial will illustrate the approach to localize the KetticPageView control and is not a translation of the control.

How to Localize KetticPageView in C# code

All the C# classes used to localize the KetticPageView control are included in the Kettic.WinForms.UI.Localize namespace. We can follow the steps below to localize the control to a specific language
  • Create a descendant of the KetticPageViewLocalizeProvider C# class.
  • Override the GetLocalizedString(string id) method
  • Offer a translation for the label and user messages. When there is no translation offered, the control will return the default value
  • Call the GetLocalizedString method in the default clause of the switch statement to guarantee the behavior

C# code for Implementing Custom Localization Provider

The C# code sample below demonstrates how to implement a custom localization provider to return translations of the default values in French,

public class MyFrenchKetticPageViewLocalizeProvider : KetticPageViewLocalizeProvider
{
public override string GetLocalizedString(string id)
{
switch (id)
{
case KetticPageViewStringId.CloseButtonTooltip:
return "Close Selected Page";
case KetticPageViewStringId.ItemListButtonTooltip:
return "Pages Available";
case KetticPageViewStringId.LeftScrollButtonTooltip:
return "Scroll Strip Left";
case KetticPageViewStringId.RightScrollButtonTooltip:
return "Scroll Strip Right";
case KetticPageViewStringId.DisplayMoreButtonsItemCaption:
return "Display More Buttons";
case KetticPageViewStringId.DisplayFewerButtonsItemCaption:
return "Display Fewer Buttons";
case KetticPageViewStringId.AddRemoveButtonsItemCaption:
return "Add or Remove Buttons";
case KetticPageViewStringId.ItemCloseButtonTooltip:
return "Close Page";
case KetticPageViewStringId.NewItemTooltipText:
return "Add New Page";
}

return base.GetLocalizedString(id);
}
}

C# code for Applying Custom Localization Provider

The C# code below demonstrates how to instantiate and assign the custom localization provider to the current localization provider

KetticPageViewLocalizeProvider.CurrentProvider = new MyFrenchKetticPageViewLocalizeProvider();

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