Microsoft Dynamics 365 Business Central: XLIFF translation files (Working with Translations)

Dynamics 365 Business Central

Hi everyone.
Today’s blog is about language translations. Dynamics 365 Business Central is multi language enabled, which means that you can display the user interface (UI) in different languages. In Dynamics 365 Business Central this is done using XLIFF files, which is a standardized format used for computer-based translations. So let’s discuss this from two topics, how to translate your own extensions and how to translate standard Business Central.

This page lists the countries/regions where Dynamics 365 Business Central is available and which languages are supported.
Country/regional availability and supported languages

Note: If you are trying to translate business central on another language that is not supported from Microsoft, You have to wait for Microsoft to add the language code to Business Central.
Language Code Sample:

You can also confirm the available languages in the My Settings.

Let’s start.

Translate Your Extensions

1. Generating the XLIFF file

To add a new language to the extension that you have built, you must first enable the generation of XLIFF files. The XLIFF file extension is .xlf. The generated XLIFF file contains the strings that are specified in properties such as CaptionCaptionML, and Tooltip.

I created a table with Caption.

Created a new List Page and Card Page, then add a message to OpenPage trigger of Card Page which contains Label.
OpenPageMesg: Label ‘Developer translation for %1’, Comment = ‘%1 is extension name’, locked = false, MaxLength = 999;

The commentlocked, and maxLength attributes are optional and the order is not enforced.

After you install this extension, you can find the language is English in Business Central.

List Page
Card Page

So how to translate it.
In the app.json file of your extension, add the following line:
“features”: [ “TranslationFile” ]

When the extension is built and published, XLIFF file will be Generated.

2. Copy the XLIFF file, or rename it in the Translations folder.

For the translation, you will now have to modify the target-language to the language code you want to translate. For example: ja-JP (Japanese)

3. Translate

Then add a <target> element per label. The <trans-unit id> attribute corresponds to the object ID in the extension. If the amount of text is very large, it will take a long time.

After the translation is completed and the Extension is installed, The user interface (UI) will change to translated language.

1. You can have only one .xlf file per language.

error AL1032: Translation file ‘(ja-JP, c:\Users\XXXX\Documents\AL\Book Shelf Lab\Translations\Book.ja-jp – copy.xlf)’ has the same target language as another translation file.

But if the languages are different, you can add more than one .xlf file.

2. If you set the Locked property to true, the generated translation file will not include these texts, so you keep it a bit cleaner.

From Business Central 2020 release wave 2 and later (BC17.1)
By setting the GenerateLockedTranslations flag in the app.json file, you specify that you want to generate <trans-unit> elements for locked labels in the XLIFF file. The default behavior is that these elements are not generated.


3. You can use the following Extension to make translation more convenient.

Run “Refresh XLF files from g.xlf” command.

Targets that are not translated will be inserted automatically.

Create a New Language Pack

The method of translation is the same as above, but the problem is how to get the XLIFF file of the standard code.
Before explaining it, I want to explain the composition of Business Central standard translation first. Translation of Business Central has two parts, Platform translation and User Interface (UI) translation.

Platform is only translated by Microsoft, and neither users nor partners can modify it now.
For Example:

Before Business Central 2019 Spring update (BC14), You can use Partner Translation Toolkit for Microsoft Dynamics 365 Business Central to translate the platform of Windows client in the On-Premise version. But as Microsoft abandoned the windows client, Microsoft has not provided any tools for SaaS until now.

The remaining part is the translation of the User Interface (UI).

XLIFF files of Standard code are placed in the extensions. (Mainly Base application and System application)

So you can take the XLIFF file from the Application folder (extracted from the source files) and then create you own extension with a new XLIFF file translated. 

For Example:
Base Application:

System Application:

And other extensions’

Combine these files into one XLIFF file.

Don’t modify the header and footer. Just merge the text into the “Body” group.


Then create a new project. Copy the merged XLIFF file to Translations folder of the project and change the target language. (This project may not contain any AL files.)

OK, the remaining big work is to translate this XLIFF file. 🤦‍♂️
Let me do a simple demonstration. I have translated “Shipment Methods”.

Table Shipment method:

Page Shipment Methods:

Publish it.

Shipment Method page will be translated.

So, if you want to make a standard language pack of Business Central, there are large amounts of text need to be translated. And with the upgrade of CU every month, the content that needs to be deleted, modified, and added will increase, and maintenance is also very time-consuming.

You can also directly unzip the translation packages of other languages provided by Microsoft and use them as translation source files.

PS: The ML versions of properties and the TextConst Data Type are not included in the .xlf file


Hope this will help.



Copied title and URL