Where can I find/put $LocLabels....? RRS feed

  • Question

  • Hello,

    In reading http://msdn.microsoft.com/en-us/library/gg328323.aspx it says: "it is a best practice to use localized labels to define text displayed in the ribbon". The sdk says pretty much the same thing.

    So as I often do when I am learning new material I go and look at how those far more knowledgeable than me do it. In this case I am looking at a Marketplace Solution. They have custom entities with some custom buttons on the entity ribbon. OK to test my new skill I am going to change the text of one of their buttons.

    So in my sandbox I create an empty solution. Add one of the entities from the market place solution. Export it then extract the customizations.xml. I then open the xml in VS2012 Prem.

    I see the entity in there and it is looking good. I find the ribbon diff section and getting close right...NOT. I've tried several different gyrations including putting everything in the solution and still I can't find the $LocLabels.

    OK let's try this from a different angle. I took one of my entities and added a button and $LocLabels to it...and it worked and it was there in the ribbon diff???

    So what am I doing wrong? Is there some slight of hand / obfuscation that one should do if they are going to publish customizations? (I'm far from that point just trying to understand)

    Here is the $LocLabel value the button has:


    I have replaced the publisher prefix and other indicators to sterilize.

    Here is one of mine:


    (any Rush fans out there?)

    One thing I noticed different between the two is their use of the AB indicator between the LocLabels and publisher prefix. Is that a reference to a plugin or similar?

    I guess to further emphasize my confusion I have done a global search through all the xml files in an the solution and I can't find any part of the $LocLabel value??

    Thank You for any help getting this sorted in my head.

    • Edited by zzpluralza Tuesday, March 4, 2014 1:46 AM
    Tuesday, March 4, 2014 1:41 AM

All replies

  • In my opinion, $LocLabel is a global variable it always return the correct label string according current system culture. For exmaple you have a ribbon button, and you had configured two language lables for it. one is English, another is Chinese. If you switch system culture from English to Chinese, the ribbon button's lable will be a chinese string.

    • Proposed as answer by Chen Xiong Tuesday, March 4, 2014 4:58 AM
    • Edited by Chen Xiong Tuesday, March 4, 2014 11:52 AM correct it
    Tuesday, March 4, 2014 4:58 AM
  • OK.....so where is it then? It is a customization so it has to be somewhere no?
    Tuesday, March 4, 2014 10:56 AM
  • $LocLabels are defined inside the ribbonDiffXml, the $ symbol actually indicates that.
    If for example we consider a button added to the ribbon

    <Button Id="new_buttonLaunchDialog"
    Image32by32="$webresource:new_dialog32.png" />

    all the three properties (label, tooltip title and tooltip description) points to the same label
    and the loclabel is defined as follow:

    <LocLabel Id="labelLaunchDialog">
    <Title languagecode="1033" description="Dialog [ENG]" />
    <Title languagecode="1040" description="Dialog [ITA]" />

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Tuesday, March 4, 2014 11:34 AM
  • This makes sense and matches sdk & online from Msoft.

    My question is how can company X who has a solution from the marketplace I am playing with have a $LocLabel defined yet I can't find it in the ribbon diff?

    Quite possibly I am going about cracking open the ribbon diff incorrectly? So...

    1. Create Blank Solution

    2. Add market place solution entity that has custom buttons on the form ribbon and home ribbon. 

    3. Open Ribbon Workbench (From Develop 1 Scott Durow...sweet tool he should charge)

    4. Look at the entity / custom buttons to find their $LocLabel values for said buttons.

    5. Export Solution and extract customizations.xml

    6. Open in VS2012 and...Houdini's been here cause the $LocLabels aren't???

    Now the question is academic because I CAN change their values. Again using the very cool Ribbon Workbench I can right click to customize the button and then delete their $LocLabel entries and enter whatever I want.....which incidentally shows up in the Ribbon Diff????

    So I'm just trying to learn / reverse engineer / decipher whatever cool slight of hand they are using.

    Tuesday, March 4, 2014 12:05 PM
  • Hi zzpluralza,

    I think you need to add the Application Ribbon (under Client Extensions) to your blank solution along with the other entities that you might have added, only then will you be able to see the LocLabels after exporting and extracting customizations.xml.

    Admin QuikView Solution for CRM 2013

    Tuesday, March 4, 2014 12:11 PM
  • Sorry...should have mentioned that. It is in there as well.
    Tuesday, March 4, 2014 12:18 PM
  • I don't know why you don't see the loclabels entry when you export the solution, BUT also if it is a managed solution, you don't need to install and export it to see how is builded.
    Just extract the zip to a folder and check the customizations.xml (you can also do a "Find in Files" with Notepad++ looking for the loclabel name)

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Tuesday, March 4, 2014 12:20 PM