Microsoft Dynamics NAV 2009 – How to Import Translations

I know this isn’t the usual fare for my website, but I thought, what the heck, it is what I do for a dayjob, so why not.

If you don’t know what this application is, then don’t worry about this post.

I tried this experiment in NAV 2009 R2 Classic Client, so I can’t vouch for other versions.

The only reason I’m actually writing this, is because I have encountered this problem before while importing translation files into NAV whereby it crashes NAV.

Recently, I was working on a translation for Guatemala, and loading a file that was translated for Spain. It came to me in OEM 850 encoding (aka Latin-1), and believe me it took me a while to figure that out).

At first, I  thought the encoding was causing problems, so I changed it around to different ones to no avail. It still kept on crashing.

I tried selecting only Tables or Forms from the Object Designer, to the same end result. Crash.

I tried using ICONV to convert it, as well as Notepad++, in case you’re looking for some tools that can do this. ICONV is by far more complete, but Notepad++ has most of the things you’ll need.

I was about to give up when I took the first 500 lines of the translation file and ran it through… and it worked. Moral of the story? Make sure your file isn’t too large, or it will crash NAV.

I also tried a file with 1500 lines (about half of the original) and it worked too.

I tried that file while selecting All objects in NAV, and lo and behold that worked too.

So, here are the steps I use to import a language translation (all the CaptionML, etc. tags in NAV) in Microsoft Dynamics NAV 2009 R2 Classic Client:

1. Make sure your text file is no larger than, say 1500 lines (your mileage may vary)

2. Go into NAV, then open up the Object Designer (Shift-F12) – obviously, you’ll need access to Object Designer in your license file.

3. Click on the ALL button, then select all the Objects in NAV by hitting CTRL-A or clicking the top-left-most square, to the left of the ID column header. This tells NAV to which objects you want to apply the imported translation.

NB: MAKE SURE ALL YOUR SELECTED OBJECTS ARE COMPILED OR YOU’LL GET AN ERROR: “The object … must be compiled.” and you’ll have to start over. HINT: in the Object Designer, filter by Compiled = ‘Yes’ before Selecting All.

NB2: You also selected an object type at a time (sometimes you get Library errors and if you do it a chunk at a time, it’s quicker and if you have  to exclude an object and start over, you won’t want to hit your head against the wall quite as much), but what I really found interesting, is that in some cases, if I just separated the last 20 or so lines (the ones that start with M51), that was enough to let the rest go in without breaking it down further. In other words, if I broke down the file in 2, with the second part containing only the last 20 lines, both files imported fine. Sometimes, the file with 20 lines had to be broken down into 2 separate files, but that was generally it… much simpler than breaking it into a million pieces.

4. Go to Tools / Translate / Import

5. Select your file using the dialog box, and wait.

6. When the progress counter reaches 100% you’ll be presented with a dialog asking whether you want to complete the import. Click ‘Yes’.

7. And that’s it, if you change to the new language, you should see the new translations (i.e. things that were showing up in English should now show up in Spanish, unless they weren’t a part of the file you imported, of course).

Like I said, I only tried this in NAV 2009 R2 Classic Client, so I can’t vouch for other versions, but I imagine they’ll work similarly (certainly the Translation Import function is located in the same menu).

Hope this is of some help to you.