How to move Labels from One environment to another environment.

Hi,

In AX 2012 I want to move my development environment Label file to Test Environment. How to move it Please guide.

HI,

Try this,

str path = @“C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\Application\Appl\Standard”;

container files = [“axXXX”,“axYYY”

];

container extensions = [ “en-us.ald”,

“en-gb.ald”,

“it.ald”,

“fr.ald”,

“fr-be.ald”,

“de.ald”,

“es.ald”,

“zh-cn.ald” ];

FilenameOpen file;

#WINAPI

int i;

int j;

SysLabelFile labelFile;

for(i=1; i<=conLen(files); i++)

{

for(j=1; j<=conLen(extensions); j++)

{

file = path + conPeek(files, i) + conPeek(extensions, j);

if( WinAPI::fileExists(file)) // check file exists

{

// In AX 2012 there are 2 files for chinese, so we copy(overwrite) the old file in the user desktop with the new name

if( conPeek(extensions, j) == “zh-cn.ald”)

{

WinAPI::copyFile(file, WinAPI::getFolderPath(#CSIDL_DESKTOP) + @"" + conPeek(files, i) + “zh-hans.ald”, true);

file = WinAPI::getFolderPath(#CSIDL_DESKTOP) + @"" + conPeek(files, i) + “zh-hans.ald”;

}

// create from file

labelFile = SysLabelFile::newFilename(file);

labelFile.fromFile(file);

}

else

warning(strFmt(“File %1 not found”, file));

}

}

Thanks,
Suresh

Hey,

Go to AOT – Label Files – select the label file

Let say for example - \Label Files\SYS\Languages\en_us - right click on the mentioned path and select the option to “Export to label file”.Label file get exported.

Now to the environment where label file needs to imported and right click on the Label file node and select the “Create From File” , attached the exported label file path.(Before importing the label file take the backup of the exiting label file as mentioned above).

Or simply move the model containing the label file (using the usual tools: axutil or Powershell cmdlets).

Thanks All,

Martin, I agree with you, We can move the label by moving model . But in this case also there are few labels missed in new enviromnet. May i know why ?

There are two possible reasons:

  1. The labels are not included in the model file. Export it to file from the new system and review the content.
  2. Labels have been moved correctly, but they aren’t shown in GUI. Stop the AOS, remove related .ald and .ali file from the application folder and start the AOS again. AX will build the files afresh from the model store database.

Legend! worked like a charm.

www.technograffito.com/how-to-importexport-label-files-in-ax-2012-r3