Thursday, June 28, 2018

How to create Translation file in AL Project


  • In the app.json file of your extension, add the following line: 
          "features": [ "TranslationFile" ]



  • Add Caption to Page or any field. In my case i add caption to the page.



  • Now, when you run the build command (Ctrl+Shift+B) in Visual Studio Code, a Translations folder will be generated and populated with the .xlf file that contains all the labels, label properties, and report labels that you are using in the extension.



  • In the generated .xlf file, you can see a <source> element for each label. For the translation, you will now have to add the target-language and a <target> element per label. This is illustrated in the example below. 


                     


  • Now, open the RTC and change the language to German (Germany).

 


  • And after change that language to German (Germany), In my case I add target element to Created in German you can see now, caption changed to Created in German.