Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Basicform - Update Xliff from inline translationsNew to Visual Studio Code? Get it now.
Basicform - Update Xliff from inline translations

Basicform - Update Xliff from inline translations

BasicformOrg

|
14 installs
| (0) | Free
Parse inline AL translations (//T <lang>=...) and update the XLIFF translation files with suggested target values. (run after NAB update)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Update Xliff from inline translations

This Visual Studio Code extension allows you to parse inline AL language translations found in //T =... comments and update the corresponding XLiff (.xlf) translation files within the Translations folder of your Business Central AL project.

Features

  • Parse inline translations from .al files.
  • Updates XLiff targets that are [NAB: NOT TRANSLATED] or appends a suggested target line if already translated.
  • Logs all applied translations to a translations.txt file at the project root.
  • Warns about conflicting translations and multiple language files.

How to Use Ensure your workspace contains a Business Central AL project with .al files and a Translations folder containing XLiff files in the format .-.xlf.

Inline translations should be placed as comments above a Label, Caption, or Tooltip definition. For example:

//T is='Viðskiptavinir samtals %1',comment='%1=fjöldi viðskiptavina'; CustomersLbl: Label 'Customers total %1',comment='%1=number of customers';

This will provide a dictionary entry mapping 'Customers total %1' to 'Viðskiptavinir samtals %1'.

Another example:

//T is='Tímabundin starfsemi'; Caption = 'TempJobType';

This maps 'TempJobType' to 'Tímabundin starfsemi'.

Open the Command Palette (Ctrl+Shift+P on Windows or Cmd+Shift+P on Mac), run the command "Parse inline translations to Xliff".

The extension will:

  • Parse all .al files for inline translations.
  • Find the corresponding .xlf files in the Translations folder.
  • Update the elements from [NAB: NOT TRANSLATED] to the found translations.
  • If a target is already translated, it appends a suggested translation line.
  • Logs the applied translations to translations.txt.
  • If no translations are made, translations.txt will not be modified for that run.

Project Files Created

  • package.json: Extension manifest.
  • extension.js: Main extension code.
  • README.md: Instructions and usage details.
  • test/test.js: Basic unit test.
  • test/sample.al: Sample AL file with inline translations.
  • test/sample.xlf: Sample XLF file representing translations.

Unit Tests Open the extension folder in VS Code. Run npm install to install dependencies. Use VSCode’s extension test features or a test runner to run the tests.

Publisher Information

  • Publisher Name: Basicform.org
  • Publisher Email: info@basicform.org
  • Publisher URL: https://basicform.org/bc/
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft