RichTextEditorRibbonBar localization

1 Answer 177 Views
RichTextEditor
Tomáš
Top achievements
Rank 1
Iron
Tomáš asked on 06 Aug 2021, 09:06 AM

Hello,

I'd like to localize the RichTextEditorRibbonBar. I've found an useful link with a sample xml file which helped me to localize some parts. But it seems it doesn't contain all the controls of the RichTextEditorRibbonBar. For example - I wasn't able to localize the Simplified Layout:

There is no occurrence of a word Simplified in the xml file.

How should I localize this?

Thanks

Tomáš

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 06 Aug 2021, 03:39 PM

Hello, Tomáš,

RibbonUI is a derivative of RadRibbonBar. The simplified button is a functionality coming from the basic RadRibbonBar. That is why it is not included in the XML file with the strings for RadRichTextEditor. However, we had logged this logged in our feedback portal and already a fix for this is available. Here is the feedback item for your reference. 

In R2 2019 SP1 (and LIB 2019.2.603) you will be able to change the default "Simplified Ribbon" text in LocalizationSettings as follows:

this.richTextEditorRibbonBar1.LocalizationSettings.LayoutModeText = "Compact Layout";

If you are using the specified or a later Telerik version you should be able to benefit from the fix.

I hope this helps. If you have any other questions do not hesitate to ask.

Regards,
Nadya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tomáš
Top achievements
Rank 1
Iron
commented on 10 Aug 2021, 11:31 AM

Hello, Nadya,

thank you for your reply. The suggested code worked. I would rather have all the translations in one file, but it's better to have it like this than not at all. I still have a little issue - the buttons on RibbonBar don't show their tooltiptexts. Only a submenu of Paste command shows tooltiptexts. Am I missing something in the RibbonBar initialization?

Tomáš

Dess | Tech Support Engineer, Principal
Telerik team
commented on 10 Aug 2021, 02:29 PM

Hello, Tomáš,

The different paste options menu items have tooltip text assigned to the buttons. If you want to have tooltips for the rest of the buttons in the Ribbon UI, you can handle the ToolTipTextNeeded and apply the desired text according to the sender element. 

I have prepared a sample code snippet for your reference handling the case with RadButtonElements. You can use a similar approach for the rest of the items: 

        public RadForm1()
        {
            InitializeComponent();

            this.richTextEditorRibbonBar1.ToolTipTextNeeded += richTextEditorRibbonBar1_ToolTipTextNeeded;
        }

        private void richTextEditorRibbonBar1_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e)
        {
            RadButtonElement btn = sender as RadButtonElement;
            if (btn != null)
            {
                e.ToolTipText = btn.Text;
            }
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Tomáš
Top achievements
Rank 1
Iron
commented on 11 Aug 2021, 07:21 AM

Hello, Dess,

thank you. It was helpful, as always.

Tomáš

Tags
RichTextEditor
Asked by
Tomáš
Top achievements
Rank 1
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or