I needed to import some mods into a new environment and also include the label files. The label file from the AOT was exported into the XPO, but when attempting to import the file (Figure 1), I was receiving an error 'expected LABELFILE but found LANGUAGES' (Figure 2). From what I can gather the XPO only has language information of the label file but will not actually create the label file. This creates an issue on import. If we want the whole label file in the new environment (like I do), we should go a different route which I will explain below.
NOTE: This is just one way to move the labels. There are other methods. Choose the appropriate one for your situation
Figure 1 - Import attempt of label file via XPO
Figure 2 - The error trying to import a new label file via XPO
In the source environment, navigate out to the label you want to move to the new environment. Expand out nodes so you can see the language you need to migrate. Right click on the language (en-us for my example) and select 'Export to Label file' (Figure 3). You will need to select a location to save your .ald file for later import into the destination environment where you want the label.
The .ald file ('application label data' I believe) should look familiar to people from the previous versions of AX. In those previous versions there were also .ali (label index) and .alc (label cache) files. Just to clarify, depending on how you did the move in previous versions of AX, you didn't need to move those two files during migration; just moving the .ald would be sufficient. That is why in the method I'm showing, you only need to import the .ald file. The .ald file contains all the actual label data.
Figure 3 - The 'Export to Label file' option
In the destination environment, right click on the 'Label files' node of the AOT. Select the 'Create from File' option (Figure 4). Again, to avoid confusion, this is for moving a label file with all of its contents to a new environment where the label doesn't exist. Select the .ald file exported from the source environment and click ok. You will receive a confirmation of the import (Figure 5).
At this point, you should see the new label file in your AOT. In my instance, it had a red line to the left of it indicating that the object needed to be saved. When right clicking on the new label file object in the AOT, I did not have an option to save the label like you can have on other objects. To save the file, I had to select the new object with the red line, then click the 'Save all' button in the AOT window tool bar (Figure 6). This saved the object.
That should be all you need!
Figure 4 - 'Create from File' option when right clicking on the 'Label Files' node in the AOT
Figure 5 - The imported label file confirmation
Figure 6 - Highlight the imported label and click the 'save all' button in the AOT window