Localization
To localize RadTabbedForm to display any text and messages in a specific language:
-
All required classes for localization are defined in Telerik.WinControls.UI.Localization namespace.
-
Start by creating a descendant of the RadTabbedFormControlLocalizationProvider class.
-
Override the GetLocalizedString(string id) method and provide a translation for the label and user messages. If a translation is not provided, the default value will be returned. This behavior is guaranteed by the call to the base GetLocalizedString method in the default clause of the switch statement in the example.
Below is a sample implementation of an English localization provider:
class MyRadTabbedFormControlLocalizationProvider : RadTabbedFormControlLocalizationProvider
{
public override string GetLocalizedString(string id)
{
switch (id)
{
case RadTabbedFormControlStringId.NewTabMenuTtem: return "New tab";
case RadTabbedFormControlStringId.PinTabMenuTtem: return "Pin tab";
case RadTabbedFormControlStringId.CloseTabMenuTtem: return "Close tab";
case RadTabbedFormControlStringId.CloseOtherTabsMenuTtem: return "Close other tabs";
case RadTabbedFormControlStringId.CloseRightTabsMenuTtem: return "Close tabs to the right";
case RadTabbedFormControlStringId.UnpinTabMenuTtem: return "Unpin tab";
}
return base.GetLocalizedString(id);
}
}
To apply the custom localization provider, instantiate and assign it to the current localization provider:
Assigning the Current Localization Provider
RadTabbedFormControlLocalizationProvider.CurrentProvider = new MyRadTabbedFormControlLocalizationProvider();