Command line interface

The command line runs Lingobit Localizer operations from a build script or a build server: Scan for Changes, validation, import of translations, translation tasks, and Create Localized Files.

The command line is available in Professional, Enterprise, and Enterprise Multi-User; the Command Line License is included with these editions. It is not available in Standard and in Translator Edition. In the trial, the command line always runs in Enterprise mode so you can test your build process; the Trial limitations still apply. See Trial Limitations.

Usage

localizer.com <project file> -switch1 -switch2:value ...

localizer.com is in the Lingobit Localizer installation folder. Run localizer.com -help to list the switches available in your edition. Paths with spaces go in quotes, for example -add:"C:\Build Output\MyApp.exe".

The project is not saved unless you add -save.

Example

localizer.com MyApp.loc -scan -lang:all -validate -create -save

Scans the new build, validates all target languages, creates the localized files, and saves the project. The exit code is not zero if validation finds issues or an operation fails.

Switches

SwitchAction
-scanScan for Changes. See Scan for Changes.
-validateRun all enabled validation checks for the selected languages. Returns a non-zero exit code when issues are found.
-add:fileAdd a file to the project.
-netparser:versionWith -add: the .NET parser version, for example auto, net4, net6, net8.
-netarch:archWith -add: the .NET worker architecture: auto, x86, x64.
-netsdk:modeWith -add: the .NET SDK for satellite assemblies of the added file: matching (require the target major) or newer (allow a later installed SDK). Newer SDK fallback is allowed by default unless overridden by saved project/file settings.
-format:nameWith -add: the format to parse the file with, for example pe, dotnet, xml, po, qt-ts, copy, skip. An unknown name lists the available formats.
-addfolder:folderAdd a folder to the project. Enterprise.
-importtranslations[:path]Import translations from localized files that the project finds for the selected languages. With a path, only from the files under that path. See Import Translations from Localized Files.
-pseudo[:always]Pseudo-translate the selected languages. Without always, existing translations are kept.
-pseudoexpand:NWith -pseudo: expand the text by N percent, 0 to 100.
-pseudobounds[:always]Shift the translated position of controls by 1 and enlarge them by 1 in the selected languages.
-deletetranslationsDelete the translations of the selected languages.
-importtmx:pathImport the translation memory entries that match the project from .tmx, .loc_tm, .ltp_tm, or .csv files, a folder, or a .zip file.
-tmthreshold:NWith -importtmx: the match threshold, 1 to 100. The default is 100, exact matches only.
-exporttmx:fileExport the project translations to a TMX file.
-translate[:always]Translate using translation memory. Without always, existing translations are kept.
-terminology[:always]Translate using terminology. Enterprise.
-duplicateTranslate duplicates.
-create[:withnative]Create localized files for the selected languages; with withnative, also for the original language. Follows the Validation before Create Localized setting of the project.
-sendltp:fileCreate a translator project.
-sendkit:folderCreate a Delivery Bundle.
-sendcsv:fileCreate a CSV file for one language. Requires -csvencoding.
-sendxliff:fileCreate an XLIFF file for one language.
-receiveltp:fileImport a translator project. With -lang:all, all languages of the file.
-receivecsv:fileImport a CSV file for one language. Requires -csvencoding.
-receivexliff:fileImport an XLIFF file for one language.
-xliffaccept:presetWith -receivexliff: which targets to take: standard (default), any, approved. See Import Translation Results.
-csvencoding:encodingThe encoding for -sendcsv and -receivecsv: utf8, utf16, ansi.
-lang:id|allThe languages to work on: a language ID of the project, or all. Without it, the current target language of the project is used. The -send... and -receive... switches require it.
-save[:file]Save the project before exit, or save it as another file.
-silentDo not report the preset answers to questions (see below).
-helpList the switches.

The language ID is the number shown as Language Id in Project > Languages > Add/Remove languages, for example 1031 for German (Germany). An ID that is not a target language of the project is an error.

The -send... and -receive... switches use the translation task settings saved in the project. Prepare a task once in the wizard with Save settings in project selected. See Prepare Translation Task.

Order of operations

The switches run in this order, whatever their order on the command line:

-scan, -validate, -add, -addfolder, -pseudo, -pseudobounds, -deletetranslations, -importtranslations, -importtmx, -exporttmx, -translate, -terminology, -duplicate, -create, -sendltp, -sendkit, -sendcsv, -sendxliff, -receiveltp, -receivecsv, -receivexliff, -save.

To validate after an import, run localizer.com twice: first import and save, then validate.

Messages and exit code

The command line shows no dialogs. Progress and messages are written to the console. A question that the window would ask gets a preset answer: Yes for a required Scan for Changes, No for optional or destructive work; the answer is reported as a warning unless you use -silent.

The exit code is 0 when everything succeeds. It is 1 when an operation reports an error, for example a file that cannot be added, characters that cannot be written in the output encoding, or validation that blocks Create Localized Files, and when -validate finds issues. If a switch fails, the switches after it are not run.

See also Working with translators and How to check translations.