Menu

How to change the root name - MENU ?

Cristi P
2008-11-10
2013-03-08
  • Cristi P

    Cristi P - 2008-11-10

    Hello Everyone,

    I want to translate the name of the root directory, MENU, in my native language. Can somebody help me?

    If is not possible, can somebody tell me how can I remove this visual element.

    Best regards,
    Cristi P - www.arhipac.ro

     
    • karsten-thiemann

      Hi Cristi,

      it is not translateble via the gui - but..

      If you are able to change the java code open
      org.compiere.grid.tree.VTreePanel.java

      Go to public boolean initTree (int AD_Tree_ID)
      and add the second line:

      m_root = vTree.getRoot();
      m_root.setName("YourNativeLanguageNameForMenu");

      Regards,
      Karsten

      BTW - we should change this behaviour by adding a Message element to get the translated name...

       
      • Trifon (An ADempiere founder)

        Hi Karsten,

        >m_root = vTree.getRoot();
        >m_root.setName("YourNativeLanguageNameForMenu");

        thank you very much for the hint!

        I change a bit the logic of the transaltion.
        As each role can have different menu then we must transalte root menu depending on the menu tree used for the specific role.
        That's why i changed the code to:

        m_root = vTree.getRoot();
        m_root.setName(Msg.getMsg(Env.getCtx(), vTree.getName() ) ); // translate name of menu.

        commited with Revision: 6963
        http://adempiere.svn.sourceforge.net/adempiere/?rev=6963&view=rev

        Regards,
        Trifon

         
    • Cristi P

      Cristi P - 2008-11-10

      Thanks a lot Karsten!

      Have a nice day!

       
    • Lajos Joo

      Lajos Joo - 2008-11-20

      And if you use zk webui then the webui.desktop.java should be overwritten in doCreatePart()
              West w = new West();
              layout.appendChild(w);
              w.setWidth("300px");
              w.setCollapsible(true);
              w.setSplittable(true);
              w.setTitle("Menu");
              w.setTooltiptext("Application Menu");
      change the setTitle and setTooltiptext to native, or change the same way as Trifon.

      Lui

       

Log in to post a comment.