C1Editor translation in French

Posted by: baurez on 10 September 2017, 11:36 am EST

  • Posted 10 September 2017, 11:36 am EST

    I would like translate de C1Editor for Asp.net interface in french.


    The label in the bottom of the button, or the tooltip are in english...


    I don't know the good method for doing this.


    Someone could help me to explain me ?


    thanks


     

  • Replied 10 September 2017, 11:36 am EST

    You can localise the C1Editor in the 'Init' event using the following code :


        protected void C1Editor1_Init(object sender, EventArgs e)
        {
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[2].ToolTip = "Couleur";
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Action].ToolBars[C1EditorConst.Toolbar_Save].Items.RemoveAt(0);
            //remove insert tab
            C1Editor1.RibbonUI.TabPages.Remove("Insert");
            //change format tab groups text
            C1Editor1.RibbonUI.TabPages[0].Groups.Remove(C1EditorConst.Group_Review);
            C1Editor1.RibbonUI.TabPages[0].Groups[0].HeaderText = "Édition";
            C1Editor1.RibbonUI.TabPages[0].Groups[1].HeaderText = "Police";
            C1Editor1.RibbonUI.TabPages[0].Groups[2].HeaderText = "Paragraphe";
           
            //change font style dropdown text and tooltip
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[0].ToolTip = "Police";
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[0].Text = "Police";
           
            //change font size dropdown text and tooltip
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[1].ToolTip = "Grosseur de police";
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[1].Text = "Grosseur";
          
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Paragraph].ToolBars[C1EditorConst.Toolbar_Paragraph].Items[0].ToolTip = "Alignement gauche";
            C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Action].ToolBars[C1EditorConst.Toolbar_Edit].Items[0];
            oGroup.Items[0].ToolTip = "Annuler la dernière action";
            oGroup.Items[1].ToolTip = "Rétablir la dernière action annulée";
           
            oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Action].ToolBars[C1EditorConst.Toolbar_Edit].Items[2];
            oGroup.Items[0].ToolTip = "Couper";
            oGroup.Items[1].ToolTip = "Copier";
            oGroup.Items[2].ToolTip = "Coller";
            oGroup.Items[3].ToolTip = "Sélectionner tout";
            oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[2];
            oGroup.Items[0].ToolTip = "Colorier l'arrière-plan";
            oGroup.Items[1].ToolTip = "Colorier la police";
           
            oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[3];
            oGroup.Items[0].ToolTip = "Gras";
            oGroup.Items[1].ToolTip = "Italique";
            oGroup.Items[2].ToolTip = "Souligement";
            oGroup.Items[3].ToolTip = "Barré";
            oGroup.Items[4].ToolTip = "Indice";
            oGroup.Items[5].ToolTip = "Exposant";
           
            oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Font].ToolBars[C1EditorConst.Toolbar_Font].Items[5];
            oGroup.Items[0].ToolTip = "Effacer le format";

            oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Paragraph].ToolBars[C1EditorConst.Toolbar_Paragraph].Items[0];
            oGroup.Items[0].ToolTip = "Aligner le texte à gauche";
            oGroup.Items[1].ToolTip = "Aligner le texte à droite";
            oGroup.Items[2].ToolTip = "centrer";
            oGroup.Items[3].ToolTip = "justifier";
            oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Paragraph].ToolBars[C1EditorConst.Toolbar_Paragraph].Items[2];
            oGroup.Items[0].ToolTip = "Liste numérotée";
            oGroup.Items[1].ToolTip = "Liste à puce";
            oGroup = (C1.Web.UI.Controls.C1ToolBar.C1ToolBarGroup)C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Paragraph].ToolBars[C1EditorConst.Toolbar_Paragraph].Items[3];
            oGroup.Items[0].ToolTip = "Augmenter le retrait";
            oGroup.Items[1].ToolTip = "Diminuer le retrait";

            ////supprime les boutons prévisualiser et imprimer
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Action].ToolBars[C1EditorConst.Toolbar_Edit].Items.RemoveAt(1);
            C1Editor1.RibbonUI.TabPages[C1EditorConst.Page_Format].Groups[C1EditorConst.Group_Paragraph].ToolBars[C1EditorConst.Toolbar_Paragraph].Items.RemoveAt(1);

        }




    Please refer to the attached sample 'Sample_C1Editor_Localized' for the implementation.


     


     


     


    2011/03/245678_Sample_C1Editor_Localized.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels