This is a migrated thread and some comments may be shown as answers.

about LocalizationSettings

2 Answers 52 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cüneyit Baş
Top achievements
Rank 1
Cüneyit Baş asked on 12 Jul 2010, 09:22 PM
Hi all;
I change my settings LocalizationSettings (Turkish). But when I run the program I see the original LocalizationSettings values. How do I change it?

How do I change the values of other objects LocalizationSettings?

2 Answers, 1 is accepted

Sort by
0
Bernd Mueller
Top achievements
Rank 1
answered on 14 Jul 2010, 04:27 PM
0
Stefan
Telerik team
answered on 15 Jul 2010, 09:20 PM
Hello Cüneyit Baş,

Thank you for writing.

The general approach for localizing our controls concerns the process of creating your own localization providers, as you can find out in the code library section that Bernd has given: http://www.telerik.com/community/code-library/winforms/localization-providers.aspx.

In regards to RadPanelBar, the versions prior to Q2 2010 do not support localization providers. However, as of Q2 2010, the new control that substitutes RadPanelBar - RadPageView - allows you to localize its strings. For additional information about RadPageView, please refer to this blog post.

Please follow the steps below. They demostrate how you can localize RadPageView:
  1. Create a descendant of the RadPageViewLocalizationProvider class.
  2. Override the GetLocalizedString(string id) method and provide translation for the strings of RadPageView. If no translation is 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:
    public override string GetLocalizedString(string id)
    {
        switch(id)
        {
            case RadPageViewStringId.CloseButtonTooltip:
                return "Close Selected Page";
            case RadPageViewStringId.ItemListButtonTooltip:
                return "Available Pages";
            case RadPageViewStringId.LeftScrollButtonTooltip:
                return "Scroll Strip Left";
            case RadPageViewStringId.RightScrollButtonTooltip:
                return "Scroll Strip Right";
            case RadPageViewStringId.ShowMoreButtonsItemCaption:
                return "Show More Buttons";
            case RadPageViewStringId.ShowFewerButtonsItemCaption:
                return "Show Fewer Buttons";
            case RadPageViewStringId.AddRemoveButtonsItemCaption:
                return "Add or Remove Buttons";
            case RadPageViewStringId.ItemCloseButtonTooltip:
                return "Close Page";
            case RadPageViewStringId.NewItemTooltipText:
                return "Add New Page";
        }
     
        return base.GetLocalizedString(id);
    }

To apply the custom localization provider, instantiate and assign it to the current localization provider:

RadPageViewLocalizationProvider.CurrentProvider = new MyTurkishRadPageViewLocalizationProvider();

I hope this helps.

Sincerely yours,
Stefan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
Cüneyit Baş
Top achievements
Rank 1
Answers by
Bernd Mueller
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or