AL XLF Translator is a Visual Studio Code extension designed to simplify the translation of Business Central XLF files. It provides powerful commands to translate a single line or all missing translations in an XLF file, enhancing your productivity and ensuring your translations are up-to-date.
Features
Translate Line: Translates the text on the current line in an XLF file.
Translate All Missing Lines: Automatically translates all missing translations in an XLF file.
Visible progress: A notification and a status bar spinner show how many lines are done while translating.
Translation Constants: Define keywords or sentences which should have a specific translation. E.g. Sales Header to Salgshoved.
Installation
Open Visual Studio Code.
Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or by pressing Ctrl+Shift+X.
Search for "AL XLF Translator".
Click "Install" to install the extension.
Usage
Translate Line
Open an XLF file in Visual Studio Code.
Place the cursor on the <source> line you want to translate.
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
Type "XLF: Translate Line" and select the command.
The translation is placed in the <target> on the next line.
Translate All Missing Lines
Open an XLF file in Visual Studio Code.
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
Type "XLF: Translate All Missing Lines" and select the command.
All missing translations in the file are translated. You can follow the progress in the notification and in the status bar, and cancel from the notification.
Without an activation key, this command translates the first 5 lines per run. With a valid key it translates the whole file. Enter the key in the setting sekvens-xlf-translator.activationKey.
Translation constants
Create a new file called .vscode/translation-constants.json in your project.
Specify constant translations following this pattern.