Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AL Translation PackNew to Visual Studio Code? Get it now.
AL Translation Pack

AL Translation Pack

InfinitySoft

|
16 installs
| (0) | Free
Support Developer Translation Tool
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AL Translation Pack

This extension creates an XLF file for each language used in caption\tooltip\label comments. The caption\tooltip\label must always be entered in English and in the comments the values of the translations can be specified.

When a comment is entered, the extension creates a line that can be translated. Using the standard multilanguage formatting we can direct the extension to create the correct translations.

For example: Caption = 'Item No.', Comment = 'ITA="Nr. Articolo",ESP="Artículo No.",FRA="Numéro d'article"';

Features

To start the creation/update of the translation file you need to use the Update Translations (XLF) function. Every time you want to update the translation files (XLF) this function must be executed. The comment strings must be formatted correctly, for this reason a function has been implemented which corrects all the comment strings when the file is closed. If you want to fix the comment strings for all files of the project, you can use the Check Comment String (AL) function.

Once the translation file has been created/updated, you can choose the Auto Translations (XLF) function to add the translation to the XLF file where the comment has not been specified. Running this command will create translations for captions for which a translation has not been specified by adding the comment. At the same time a file will be created in the location .\.resource\Autranslate.json. This JSON file will contain all the translations that have been automatically suggested by the translator. By editing the translations in this file and updating the translations file using the Update Translations (XLF) command, the translation will be changed.

Also, if you want translations to be created for all AL files for which a translation has not been created, you can select the Create translation comment (AL) command.

In addition, the following snippets have been implemented:

  • CaptionWithComment: Caption = 'CaptionString', Comment = 'TranslationLanguage="TranslationString"';
  • LabelWithComment: LabelName: Label 'LabelString', Comment = 'TranslationLanguage="TranslationString"';
  • TooltipWithComment: Tooltip = 'TooltipString', Comment = 'TranslationLanguage="TranslationString"';
  • CommentForTranslation: , Comment = 'TranslationLanguage="TranslationString"';

Settings

This extension contributes the following variables to the settings:

  • Default Language When the "Default Language" is specified, the Snippets are modified to replace TranslationLanguage with the specified code.

    So if the "Default Language" is set to ITA the Snippets are modified as follows:

    • CaptionWithComment: Caption = 'CaptionString', Comment = 'ITA="TranslationString"';
    • LabelWithComment: LabelName: Label 'LabelString', Comment = 'ITA="TranslationString"';
    • TooltipWithComment: Tooltip = 'TooltipString', Comment = 'ITA="TranslationString"';
    • CommentForTranslation: , Comment = 'ITA="TranslationString"';
  • Update On Compile Project This flag allows to start the translation of the XLF file every time the project has been compiled.

  • Auto Translate Language This option represents the languages that you want to be automatically translated by the Auto Translations (XLF) feature. These can be listed separated by a comma. For example: ITA,FRA,ESP

  • Fix Comment String On Close File This flag allow the extension to fix the comment line when closing the file.

  • Create the ``Translation Comment`` automatically This flag allow the extension to create automatically Translation Comment when a caption added.

Known Issues

When a double quote is used within the translation, it does not correctly recognize the string to be translated.

For example:

TestFieldErr: Label 'The "Item No." field must be completed.', Comment = 'ITA="Il campo "Nr. Articolo" deve essere valorizzato."';

In this case, using the string "Nr. Articolo" within the comment, this create problems in correctly finding the translation.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft