Translating xliff files

My experience in translating captions by creating and updating xliff files for a Business Central extension is in short: hard to do...
Adding, deleting and modifying captions results in a mismatch between the automatically generated g.xlf file and the earlier manually created language xliff files. Or am I missing something?
So I found myself spending way too much time in fixing the language xliff files.
Couldn't this be done more efficient? Yes! Using free tool Poedit!

The captions library of Poedit can hold the complete set of captions for any Business Central language provided by Microsoft and your additional added captions.
By using a single button Poedit matches all offered source captions with the captions in the library.
With a little luck a lot of your captions can be translated automatically this way.
For the captions that couldn't be translated, translation suggestions to choose from are offered in the right pane of the Poedit screen.
While typing the translation at the bottom, it's spelling is checked as well!

The description below is based on Poedit version 2.2.4.
Any suggestions and remarks are welcome.
If another tool is able to do a better job, you're welcome to post your suggestion.

Preparation - Business Central
Download and unpack the required language version for Microsoft Dynamics Business Central on premises.
Then folder "Dynamics 365 Business Central\Applications\BaseApp\Source" contains zipfile "Base Application.Source.zip".
Unpack "Base Application.Source.zip".
Then folder "Base Application.Source\Translations" contains the base application xliff file for the required language, e.g. "Base Application.nl-NL.xlf".

Preparation - Poedit
Download and install Poedit from poedit.net/download.
Run Poedit.
Open window "Poedit preferences" via menu File, Preferences.
Press button Manage in tab "Translation Memory" (leave "Use translation memory" checked, note "Stored translations" and "Database size on disk") and select option "Import translation files".
Window "Select translation files to import" appears.
Enter path for the base application xliff file, e.g. "Base Application.nl-NL.xlf, in field "File name" and press button Open.
Popup window "Translation Memory" shows progress.
In tab "Translation Memory" values for "Stored translations" and "Database size on disk" are increased.

Preparation is finished! Let's translate!

Translate captions - Poedit
Copy the <Extension>.g.xlf to the resulting language xliff file, e.g. <Extension>.nl-NL.xlf.
Run Poedit.
Open window "Open catalogue" via menu File, Open (or button Open, or part "Edit a translation").
Enter path for language xliff file in field "File name" and press button Open.
In the top of the screen a warning is shown: "Language of the translation file is the same as source language."
Press button "Fix language", select the correct "Language of the translation" in popup "Translation Language", e.g. "Dutch (Netherlands)", and press button OK.
Poedit shows all source captions at the left of the screen. With room for the translated captions at the right.
Perform Pre-translate via menu Catalogue, Pre-translate (or button Pre-translate).
Window Pre-translate appears (leave checks as-is) and press button Pre-translate.
Popup message Pre-translate shows a summary of the result.
Manually translate the needed source captions not having a translation.
When ready translating save the modifications by menu File, Save (or button Save).

Translation is finished! A new language xliff file is created!

Extra
Easy to use in combination with VSCode extension "XLIFF Sync":
Instead of copying the <Extension>.g.xlf, it's easier to use command "XLIFF: Create New Target File(s)".
Associate xlf files with Poedit, execute command "XLIFF: Check for Missing Translations", then press button "Open Externally" and your translation file is automatically opened in Poedit.
Sign In or Register to comment.