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

Localization of Shortcut label

1 Answer 56 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Diane
Top achievements
Rank 1
Diane asked on 17 Mar 2011, 08:53 PM
Hi Telerik,

I'm wondering, do you have a way to localize the label for the shortcut text?
For example, if I put CTRL+V as the shortcut on the Paste Plain Text button, "(CTRL+V)" shows up in the hover over text for the button. But in German, "CTRL" is supposed to be "STRG". Do you have a way to localize the label?

I can make the proper label appear like so:

Telerik.Web.UI.EditorTool tool_1 = redText.FindTool("PastePlainText");
tool_1.ShortCut = "STRG+V";

And it will change the label, but it no longer actually works as a shortcut. So, it looks like the editor is using the key as the both the key and the label.
Is there a way to set the label and the shortcut seperatly?

Thanks,
Diane.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Mar 2011, 02:26 PM
Hi Diane,

I was able to achieve the requested feature using the JS code below:

<telerik:RadEditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="PastePlainText" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>
<script type="text/javascript">
    function OnClientLoad(editor) {
            var myButton = editor.getToolByName("PastePlainText");
            myButton.get_element().firstChild.setAttribute("title", "Paste Plain Text (STRG+V)");
             
    }
</script>

Cedebehind:
Telerik.Web.UI.EditorTool tool_1 = RadEditor1.FindTool("PastePlainText");
tool_1.ShortCut =
"CTRL+V";


All the best,
Rumen
the Telerik team
Tags
Editor
Asked by
Diane
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or