How to Export Translations from a NAV 2015 Database using Powershell

This procedure is in 2 steps, and is intended to extract all the language captions so NAV can be translated.

You can filter on Version List to extract only modified objects, and not everything (standard unmodified objects are already translated by Microsoft).

Step 1 is to export all modified objects as text:

Export-NAVApplicationObject -DatabaseName <DATABASE> -Path .\RESULT\AllObjects.txt -DatabaseServer <SERVER> -Filter “Version List = *YourTag*” -ExportTxtSkipUnlicensed -Force

Step 2 is to extract the Captions from those text files:

REM Export translations from said objects

Export-NAVApplicationObjectLanguage -Source .\RESULT\AllObjects.txt -Destination .\RESULT\ -LanguageID ENU

This will output a bunch of text files, like so:

Exported Translations in NAV 2015 via powershell

These text files will contain just the captions, like so:

N752-P55242-G1900206304-P8629-A1033-L999:Dimensions

N752-P55242-G1907935204-P8629-A1033-L999:&Line

N752-P8629-A1033-L999:Lines

1033 is United States English, as defined in Microsoft’s “Default Input Locales for Windows Language Packs”:

https://technet.microsoft.com/en-us/library/hh825684.aspx

OR in Table 8 (Language) in NAV.

All you have to do is add the tags for the desired language, like so (for Portuguese – PT):

N752-P55242-G1900206304-P8629-A2070-L999:Dimensões

N752-P55242-G1907935204-P8629-A2070-L999:&Linha

N752-P8629-A2070-L999:Linhas

If you simply do a search and replace on the tags and translate all the words, you’ll now have a new language file.

You can also use MergeTool  to translate the files, and it simplifies the process, and enters the correct languageIDs for you.

Step 3 is to import the new language translation into NAV:

Import-NAVApplicationObjectLanguage -Source .\RESULT\POR\ -LanguagePath .\RESULT\AllObjects.txt -Destination .\RESULT\AllObjectsWithPOR.txt

And then you have to import those text objects back into your database.

There are some examples in German here:

http://www.msdynamics.de/viewtopic.php?f=17&t=25544

I hope you find this helpful. It took me a bit of trial and error and a lot of searching to find some information about the topic.

Val Gameiro