Exercise - Multilanguage development

Completed

You are a developer for CRONUS International Ltd. You have learned how to use translation files in AL and now want to practice this newly acquired skill in Visual Studio Code. You want to translate the fields of the Customer Overview table.

Tasks

  • Enable the TranslationFile feature in the app.json file.

  • Add translation files.

  • Change settings in the translation file.

  • Add translations for every field.

Steps

  1. Open the Customer Overview project.

  2. Add a caption to all fields in the Customer Overview table.

  3. Open the app.json file and add the TranslationFile feature to the features array setting.

    "features": ["TranslationFile"],

  4. Save the modified app.json file.

  5. Build the extension. Select View > Command Palette... (Ctrl+Shift+P).

  6. Enter AL: Package in the search box and then select the command from the list.

  7. A new Translations folder will be generated. Open the .g.xlf file.

  8. Add translations for every field. Change the target-language in the .xlf file to your preferred language (for example, fr-FR for French).

  9. Add a target node for every field with the correct translation.

  10. Save the file and then rename .g.xlf file with the name of the new language (for example, fr-FR.xlf).

  11. Publish your extension to the sandbox. Select View > Command Palette... (Ctrl+Shift+P).

  12. Enter AL: Publish in the search box (or press the F5 key) and then select the command from the list.

  13. Select the Configuration wheel and then select My Settings.

  14. Set the language to the new language that you used for translation.

  15. Open the Customer Overview page and test your translations.