Search code examples
dynamics-business-central

TranslationFile is only using the target-language


I developed an app in german (de-DE) and in order to translate the captions, I added the TranslationFile feature in my app.json.

This generates a translation file, where the source-language is "en-US":

<file datatype="xml" source-language="en-US" target-language="en-US" original="RandomApp">

Not thinking much about it, I changed the source-language to "de-DE" since my captions are in german and I want them to be translated to english.

Hence:

<file datatype="xml" source-language="de-DE" target-language="en-US" original="RandomApp">

The problem that I now have, is that when I publish my extension and switch between english and german as my language in business central, all I get are the english captions.


Solution

  • The source language will always be "en-US" meaning translations will be from English (United States) to some other language.

    The captions in your source code thus needs to be in English (United States) and then you add the translation file for the german language.