How to Generate .XLF file for Caption Translation from NAV 2018?

barandeniz
Member Posts: 44
Hello, i want to try Microsoft's new LCS Translation Service, but it requires to me upload .xlf files to proceed. I could not find how to acquire proper .xlf file from NAV 2018. I can get all the ENU captions from Development Environment-->Translate Export but i do now know how to convert that .txt file .xlf file in order to upload Microsoft's Translation Service. Any ideas?
0
Best Answer
-
The translation service can also be used for NAV translation files, that is just an open industry standard.
I wrote a PowerShell script in 2015 which converts a NAV translation file to XLIFF (.xlf),
http://www.msdynamics.de/viewtopic.php?f=17&t=26976&#p110101
You may need to add your particular language code in the script in the switch statement if it is missing there.
The NAV code page in the script is 850, if you are not from Western Europe or whereever that is also used (corresponds to Windows code page 1252), you have to use your own DOS codepage like 852 for Central/Eastern Europe, 866 for Russia etc.
There is also one which you use if you want only the captions of your addon number range to appear in the XLIFF (you have to use your numbers in the function IsAddonCaption)
http://www.msdynamics.de/viewtopic.php?f=17&t=26976&#p110102
And one which allows empty target captions if these are missing
http://www.msdynamics.de/viewtopic.php?f=17&t=26976&#p110979
My script for reverse conversion XLIFF -> NAV translation file is also available here
http://www.msdynamics.de/viewtopic.php?f=17&t=28512
By my experience you have to spend many hours to correct the machine translations, don't expect too much from this service.
After you have trained the service for your terminology with the XLIFFs, you can pull translations with better accuracy.
I wrote a script to do this on-the-fly, you need an azure subscription for this one. The azure service itself is free of charge provided you don't exceed 2000000 characters per month.
It saves you lots of time, all you need is the file with the ENU captions, the script then creates a NAV translation file for your target language. In the script is just one code line that needs some attention before you can start, here you have to insert your individual "Key 1" for the translator service which you'll find in your azure account.
http://www.msdynamics.de/viewtopic.php?f=17&t=30462&p=128665#p128665
Some background infomation on how this works in my first post there from 2016, the first script version was designed for use with the old Azure DataMarket which was closed down, so use only the current one in the second post which I modified for the Azure Cognitive Services. As above, you may need to add your language codes if these are not included in the script. I have used that for French, Spanish, Dutch, Polish and Russian but it works for all languages that are supported both by the Transalator Hub and NAV.
https://docs.microsoft.com/en-us/azure/cognitive-services/translator/languages
Conversion from the machine translated Unicode UTF-8 to Codepage 850 is also included in this script, if that is not your NAV codepage adapt that part in the script. But this is usually done later anyway, after you have finished editing the unicode files.
Naturally, the description in my forum posts on msdynamics.de is all in German, but the scripts are international :-).
Kai Kowalewski3
Answers
-
xlf are exported for captions used in the new extensions developed with VS Code
there you need to add a parameter in the features block
more info here:
https://blogs.msdn.microsoft.com/nav/2017/11/08/nav-development-preview-november-update/0 -
The translation service can also be used for NAV translation files, that is just an open industry standard.
I wrote a PowerShell script in 2015 which converts a NAV translation file to XLIFF (.xlf),
http://www.msdynamics.de/viewtopic.php?f=17&t=26976&#p110101
You may need to add your particular language code in the script in the switch statement if it is missing there.
The NAV code page in the script is 850, if you are not from Western Europe or whereever that is also used (corresponds to Windows code page 1252), you have to use your own DOS codepage like 852 for Central/Eastern Europe, 866 for Russia etc.
There is also one which you use if you want only the captions of your addon number range to appear in the XLIFF (you have to use your numbers in the function IsAddonCaption)
http://www.msdynamics.de/viewtopic.php?f=17&t=26976&#p110102
And one which allows empty target captions if these are missing
http://www.msdynamics.de/viewtopic.php?f=17&t=26976&#p110979
My script for reverse conversion XLIFF -> NAV translation file is also available here
http://www.msdynamics.de/viewtopic.php?f=17&t=28512
By my experience you have to spend many hours to correct the machine translations, don't expect too much from this service.
After you have trained the service for your terminology with the XLIFFs, you can pull translations with better accuracy.
I wrote a script to do this on-the-fly, you need an azure subscription for this one. The azure service itself is free of charge provided you don't exceed 2000000 characters per month.
It saves you lots of time, all you need is the file with the ENU captions, the script then creates a NAV translation file for your target language. In the script is just one code line that needs some attention before you can start, here you have to insert your individual "Key 1" for the translator service which you'll find in your azure account.
http://www.msdynamics.de/viewtopic.php?f=17&t=30462&p=128665#p128665
Some background infomation on how this works in my first post there from 2016, the first script version was designed for use with the old Azure DataMarket which was closed down, so use only the current one in the second post which I modified for the Azure Cognitive Services. As above, you may need to add your language codes if these are not included in the script. I have used that for French, Spanish, Dutch, Polish and Russian but it works for all languages that are supported both by the Transalator Hub and NAV.
https://docs.microsoft.com/en-us/azure/cognitive-services/translator/languages
Conversion from the machine translated Unicode UTF-8 to Codepage 850 is also included in this script, if that is not your NAV codepage adapt that part in the script. But this is usually done later anyway, after you have finished editing the unicode files.
Naturally, the description in my forum posts on msdynamics.de is all in German, but the scripts are international :-).
Kai Kowalewski3 -
@Kowa most of your links are broken right now, it would be great if you could fix them, I'm working with translations in a NAV 2018 and all Google searchs leads to this post0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions