Telerik RadEditor fontname in french language it is possible ??

6 posts, 0 answers
  1. walid2013
    walid2013 avatar
    4 posts
    Member since:
    Feb 2014

    Posted 11 May 2014 Link to this post

    Hello,
    how to change the names of the fonts in dropdown  in french  language,  without changing the names of their font file (English)

    Thanks,
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 12 May 2014 Link to this post

    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
     

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. walid2013
    walid2013 avatar
    4 posts
    Member since:
    Feb 2014

    Posted 29 May 2014 in reply to Ianko Link to this post

    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.
  5. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 29 May 2014 Link to this post

    Hello,

    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.

     
  6. walid2013
    walid2013 avatar
    4 posts
    Member since:
    Feb 2014

    Posted 15 Jul 2014 in reply to Ianko Link to this post

    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
  7. walid2013
    walid2013 avatar
    4 posts
    Member since:
    Feb 2014

    Posted 15 Jul 2014 in reply to Ianko Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017