Forecloud Technologies Pvt. Ltd. - Translate your Extension in Microsoft Dynamics 365 Business Central
In this blog, I’ll guide you through the process of translating your custom extension in Microsoft Dynamics 365 Business Central.
Introduction:
Business Central is multi-language enabled, which means you can display the User Interface in different languages. In Business Central, this is done using an Xliff file.
In this post, I’ll walk you through how to add translations to your Business Central extension using XLIFF files.
Pre-requisites:
- VS Code
- Business Central Environment
Solution:
To add the translations,
In the app.json file of your extension, add the following line:
“features”: [ “TranslationFile” ]
After updating the app.json file, build your extension. By doing this, the system will automatically generate an XLIFF file for translations.
The generated XLIFF file contains the strings that are specified in properties such as Caption, CaptionML, and Tooltip.
Once the XLIFF file is generated, you can copy the generated file and rename it. I have renamed the file with the language code corresponding to the target language want to translate into.
The target language value must follow the format <language code>-<country code>. For example:
- English (United States) would be en-US
- Japanese (Japan) would be ja-JP
Inside the renamed XLIFF file, you’ll need to add a <target> element for each string label. This is where the actual translation for each item will be inserted
The result is like below
Note: You can not add multiple xlf file of the same language , which means you can have one .xlf file per language.
Conclusion:
Business Central’s multi-language capabilities, powered by XLIFF files, make it easy to display the user interface in different languages. By following the steps above, you can easily add translations to your Business Central extension and ensure your solution is accessible to users across the globe.
By modifying the app.json file, generating the XLIFF file, renaming it for the target language, and adding the translations, you can successfully implement localization in Business Central.
I hope this blog has been helpful to you!
Prathama Deshpande
Prathama Deshpande is a dedicated Business Central Developer working with Forecloud Technologies since 2023. She is one of the key responsible person for Business Central Customization Development and Functional Implementation and Support.
No comments yet. Login to start a new discussion Start a new discussion