Wednesday, July 20, 2016

Moving label files between models in AX7

When you need to move label files between models in AX 7, there are a couple of things to remember.

  • A label file consists of several files.
    Under \AxLabelFile there is an XML file for each language with some metadata about the label files.
    And then again under \LabelResources you'll find the actual label files for each language.
  • In the XML files with the metadata about the labels your need to modify the RelativeUriInModelStore property to reflect the new location.
  • You should move the above files from VSTS, so you keep version history of earlier changes.
  • If you did an earlier build, you must manually remove the compiled dll's for earlier compiled labels files. You'll find these in the Resources folder for the model you moved the files from. There is a dll directly in the folder, and one in the subfolder for each language. If you don't remove the dll's, AX might keep using the old and wrong version.  

You might want to move the label files from under ApplicationSuite, where the LCS upgrade tool puts your custom label files, into a new extension model.


DimanC said...

Hi Palle

This is an old post, but still relevant. You're stating, that under \LabelResrources we'll find the actual label files for each language.

This is not the case for my DEV machine. Under J:\AosService\PackagesLocalDirectory\ApplicationPlatform\ApplicationPlatform\AxLabelFile\LabelResources there's only en-us folder, containing labels in English. I'm trying to locate file where SYS labels for my local language are placed. When using D365, I see the correct label values in my local version, but I can't find them on DEV machine. Neither VS finds them.
What can be the cause?

Palle Agermark said...

Microsoft is not shipping translated labels files for the standard packages to DEV boxes. Earlier the reasoning was that they hadn't yet done all the translations. But now I don't know what the reason would be, except that they might have a huge backlog of other issues they find more important.

DimanC said...

Thank you for reply, Palle.

But in such case I don't understand how it works - localized labels are shown, when viewing "AX7" from browser, but I got no idea where to they come from (since there is no nb-no file for them in LabelResources).

Palle Agermark said...

That's a good question. I don't know. It must be stored somewhere in the binaries on the developer box.

Palle Agermark said...