locked
Do dynamically generated Ribbon controls support LocLabels? RRS feed

  • Question

  • I'm adding a (static) FlyoutAnchor to an entity form's ribbon, and dynamically adding a Menu/MenuSection/Controls with multiple Buttons. Originally, I used static text in all the LabelText and ToolTip fields, then switched over to using LocLabels. The FlyoutAnchor itself works perfectly, but the dynamically generated Buttons all display strings of the form "$LocLabels:<my loclabel ID>".

    I've checked and double-checked that I'm using the right IDs and that everything is imported and published. Is there something I'm missing?

    Wednesday, February 15, 2012 1:16 PM

Answers

  • I do not believe that the dynamic menu supports loclabels. An easy way of localising your menu is to define a javascript webresource that is defined for a specific locale, then reference constants in that file when dynamically generating the menu xml. At runtime, the correct webresource for the user's language will be loaded.

    If you are not using it already, you might like to checkout the Ribbon Workbench for Dynamics CRM 2011 which makes customising the ribbon much quicker and easier:

    http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx

    hth,

    Scott



    www.develop1.net
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"



    Wednesday, February 15, 2012 5:39 PM
    Answerer

All replies

  • I do not believe that the dynamic menu supports loclabels. An easy way of localising your menu is to define a javascript webresource that is defined for a specific locale, then reference constants in that file when dynamically generating the menu xml. At runtime, the correct webresource for the user's language will be loaded.

    If you are not using it already, you might like to checkout the Ribbon Workbench for Dynamics CRM 2011 which makes customising the ribbon much quicker and easier:

    http://www.develop1.net/public/page/Ribbon-Workbench-for-Dynamics-CRM-2011.aspx

    hth,

    Scott



    www.develop1.net
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"



    Wednesday, February 15, 2012 5:39 PM
    Answerer
  • Thanks for the reply and the suggested alternative. We looked at a couple of ribbon editors a short while ago, but haven't come across yours before - will be sure to have a look!
    Thursday, February 16, 2012 9:05 AM