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

Changing dialog button text in code behind

1 Answer 78 Views
Editor
This is a migrated thread and some comments may be shown as answers.
AR
Top achievements
Rank 1
AR asked on 12 Aug 2013, 01:22 PM
Hello,

I'm having problems changing the dialog button text (for link manager and image manager ) in code behind. 

I was able to change the text for the spellchecker by doing the following:
oRadEd.Localization.Main.SpellCheckEnd = "MyText";

If I try to do something similar for the Dialog windows It is not possible since oRadEd.Localization only offers to change Main, Modules and Tools text. I don't have access to the dialog text. 

The reason why we must do this that way is because we store the translation in database. 

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 13 Aug 2013, 01:11 PM
Hi AuĂ°unn,

The dialogs are designed to use the built-in localization of RadEditor control. Nevertheless, further customization of the built-in dialogs could be a possible approach to achieve getting the translated text from database. 

For this approach first you need to get the original dialogs from [installation_folder]/EditorDialogs.
After that copy them in a desired folder in your project and point the path to them as value in the ExternalDialogsPath property. 

In the dialog files you could see that the text values are set with JavaScript code like this:
document.write(localization["CssClass"]);
You could modify the wrapper elements with setting the runat property and an unique ID. With these modifications you should be able to set the values from the code-behind and use a database.

Please note that such customizations are out of the scope of our support service and you should use them at your own risk.
 
Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
AR
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or