Label file for multiple languages imported using ALDImport

I recently stumbled across an interesting issue: when importing a label file for multiple languages (let's say I'm importing the en-us and then another language, like en-au) using the ax32.exe ALDImport switch, I noticed that the second file I import (en-au) gets imported properly (or at least it looks like it does), but restarting the AOS an .ald.bak file is created and the content for the label file main .ald is erased.

Now, this happens consistently, so I am not sure if it's something I should be doing differently, or if it's actually a problem with the sequence of the steps I take. Nevertheless I needed this fixed, so the fastest way that seems to solve it is issuing the import command once for all the labels, stopping the AOS, starting it, and issuing a second import command for all the secondary label files only. Stopping and starting the AOS seems to work fine and the content of the files is not erased anymore.

2 comments:

  1. Hi Lulian

    When the AOS starts, it will make sure the labels persisted inside the modelstore gets priority. So if it finds labels in the modelstore AND also ALD-files on disk, it will rename the files on disk to BAK files and then write down to disk the label files comming from the modelstore. So basically the modelstore "owns" the labels. You can also see in the Event viewer if the AOS finds ALD files not found in the modelstore, it will still load the labels and make a note of that in the Event viewer.

    Keep up the blogging! :-)

    ReplyDelete
    Replies
    1. Hi Tommy,

      Yes, I agree with you on how the .bak files work, and I am doing a clean up of the .ald files before starting the AOS the first time I am importing the files. The process above is part of an automated build script, which of course, stops the AOS, cleans up the labels, starts the AOS, imports them, stops the AOS, and continues with other tasks. The issue seems to be when I am doing a multiple import - more than one language per label file - it is a localization which requires not only the en-us :) - I am issuing two ALDImport command one after another, the label files are imported properly, but the moment I restart the AOS, one language file get's erased. I think it has to do with the way the label files are flushed - I was just looking into this.
      However, I will look also in the Event Viewer to see if the AOS logs anything strange in there - thanks for reminding me that.

      Delete