Powershell script used for the creation of NAV translation files. This enables you to keep track of all of the translations directly in the AL code.
Make sure to enable the translation feature in app.json
{
...
"features": [ "TranslationFile"],
...
}
Add translations in AL code by using a comment:
Caption = 'English',
Comment = '[NLD = Dutch][NLB = Dutch Belguim]';
Run the script after compiling with .\create_translations.ps1
.
Parameter | Explaination | Default |
---|---|---|
Path | Location of the translation file (.g.xlf ) |
./Translations |
Languages | Array with languages to translate. Format is the same as the old CaptionML languages |
NLD |
Targets | Array with iso language codes. Must be equal in length as Languages parameter |
nl-NL |
CheckForError | Throws error if not all texts in the translation file have a translation | 1 |
OverwriteFiles | Overwrite existing translation files | 1 |