Hello,
how to change the names of the fonts in dropdown in french language, without changing the names of their font file (English)
Thanks,
how to change the names of the fonts in dropdown in french language, without changing the names of their font file (English)
Thanks,
5 Answers, 1 is accepted
0
Hello,
The RadEditor's functionality about the fonts is to priovide ability to setup a collection of actual font names. They cannot be translated because they are native values defined by CSS or JavaScript.
Translating such matters is not a correct matter for an XHTML editor. For example the Courier New is a value that will be set through CSS or JavaScript and changing it to another one will break this functionality as it will be set to the translated text, but not to the value.
What I can suggest is implemented a custom dropdown that shows the translated text but triggers the native functionality with the proper values.
Regards,
Ianko
Telerik
The RadEditor's functionality about the fonts is to priovide ability to setup a collection of actual font names. They cannot be translated because they are native values defined by CSS or JavaScript.
Translating such matters is not a correct matter for an XHTML editor. For example the Courier New is a value that will be set through CSS or JavaScript and changing it to another one will break this functionality as it will be set to the translated text, but not to the value.
What I can suggest is implemented a custom dropdown that shows the translated text but triggers the native functionality with the proper values.
Regards,
Ianko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
walid2013
Top achievements
Rank 1
answered on 29 May 2014, 08:03 AM
Hello Lanko, thanks for your response, I am a beginner, i understand exactly, what you had said, i like your solution, but can you, help me , because i had tried it, but it´s complex !!,
thank you very much.
thank you very much.
0
Hello,
The following example code demonstrates how such custom dropdown can be created.
Further logic should be build as per to the application requirements.
Regards,
Ianko
Telerik
The following example code demonstrates how such custom dropdown can be created.
<
telerik:RadEditor
runat
=
"server"
ID
=
"RadEditor1"
OnClientCommandExecuting
=
"OnClientCommandExecuting"
>
<
Tools
>
<
telerik:EditorToolGroup
>
<
telerik:EditorDropDown
Name
=
"CustomFontNames"
Text
=
"Font Names"
ItemsPerRow
=
"1"
PopupWidth
=
"200px"
PopupHeight
=
"117px"
>
<
telerik:EditorDropDownItem
Name="Desired Name for <span
style
=
'font-family: Tahoma;'
>Arial</
span
>" Value="Arial" />
<
telerik:EditorDropDownItem
Name="Desired Name for <span
style
=
'font-family: Courier New;'
>Courier New</
span
>" Value="Courier New" />
<
telerik:EditorDropDownItem
Name="Desired Name for <span
style
=
'font-family: Tahoma;'
>Tahoma</
span
>" Value="Tahoma" />
</
telerik:EditorDropDown
>
<
telerik:EditorTool
Name
=
"FontName"
/>
</
telerik:EditorToolGroup
>
</
Tools
>
</
telerik:RadEditor
>
<
script
type
=
"text/javascript"
>
function OnClientCommandExecuting(editor, args) {
var name = args.get_commandName(); //The command name
var val = args.get_value(); //The tool that initiated the command
var argObject;
if (name == "CustomFontNames") {
argObject = new Telerik.Web.UI.EditorCommandEventArgs();
argObject.set_value(val);
editor.fire("FontName", argObject);
//Cancel the further execution of the command
args.set_cancel(true);
}
}
</
script
>
Further logic should be build as per to the application requirements.
Regards,
Ianko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
walid2013
Top achievements
Rank 1
answered on 15 Jul 2014, 10:31 AM
Hello Lanko,
sorry for the delay on the response, I was back on my project! Ultimately the client abandonned the idea, we staying with the standard Telerik! thank you very much
sorry for the delay on the response, I was back on my project! Ultimately the client abandonned the idea, we staying with the standard Telerik! thank you very much
0
walid2013
Top achievements
Rank 1
answered on 15 Jul 2014, 10:31 AM
Hello Lanko,
sorry for the delay on the response, I was back on my project! Ultimately the client abandonned the idea, we staying with the standard Telerik! thank you very much
sorry for the delay on the response, I was back on my project! Ultimately the client abandonned the idea, we staying with the standard Telerik! thank you very much