I have a small problem - I have to list all the labels of several large shared projects, so labels that are missing a translation are identified updated.
Now what I'm looking is something like Palle Agermark's label export job (http://www.agermark.com/2011/10/export-and-import-labels-for.html) but one that goes through one or more projects and pulls all the label IDs (regardless of label series) and values for three languages to Excel.
Can this be done, any pointers? :)
The simplest solution would be to go to the label source directly.
In AX 2009 the labels are stored in the application folder and named like like axSYSen-us.ald with the following parts:
The files are in text format and can easily be imported to Excel or edited with an text editor.
You could import to Excel, one sheet for each label file, then combine the output in a separate sheet (in the same workbook) using Excel formulas.
In AX 2012 the labels are stored in the model database and the .ald files are created on startup.
This expands the idea of Jan B. Kjeldsen's last comment to get the labels from the project xpo file. The labels are saved in the xpo file in the following XML structure:
My first idea was to import this XML to Excel, but Excel does not play nice with column names in attributes. So instead I wrote an xsl that transforms the XML into something like the following:
To do this transformation, the original XML has to be cleaned up a bit, replace all occurences of
Table:Record
withrecord
and all occurences ofTable:Field
withfield
. Also add a root XML nodelabels
. It should look likeNow for the fun part (at least for me because I had not much prior knowledge of xsl syntax), the xsl transformation file. I ended up with the following, which will produce the wanted XML using http://www.freeformatter.com/xsl-transformer.html:
The resulting XML can then be imported into Excel using the Excel developer Tools for XML. The result will look like