OmegaT Console Mode

 

The purpose of the console mode is to use OmegaT as translation tool in a scripting environment. When started in console mode, no GUI is loaded (so it will work on any console). Depending on the running mode, the given project is automatically translated or a pseudo-translated translation memory is created.


Prerequisites

To run OmegaT, a valid OmegaT-project must be present. The location does not matter, since you have to add it to the command-line at startup anyway.

If you need altered settings, the configuration files must be present. This can be achieved in two ways:

  1. Run OmegaT normally (with the GUI) and set the settings. If you start OmegaT in console mode, it will use the same settings. If you can't run OmegaT normally (no graphical environment available):
  2. Copy the settings files from some other OmegaT installation on another machine to a specific directory. The location does not matter, since you can add it to the command-line at startup. The relevant files are filters.conf and segmentation.conf and can be found in the user home directory (E.g. C:\Documents and Settings\%User%\OmegaT under windows, %user%/.omegat/ under Linux)

Starting in console mode

To start OmegaT in console mode, some extra parameters have to be passed on startup. Required are <project-dir> and --mode=<mode>.

Depending on the mode, additional parameters have to be (or can be) provided. See command line arguments for more information.

Example of translate project:
$>java -jar OmegaT.jar /path/to/project --config-dir=/path/to/config-files/ --mode=console-translate
Example of translate project for a single file:
$>java -jar OmegaT.jar /path/to/project --config-dir=/path/to/config-files/ --mode=console-translate --source-pattern=test\.html
Example of create pseudo translated tmx:
java -jar OmegaT.jar /path/to/project --config-dir=/path/to/config-files/ --mode=console-createpseudotranslatetmx --pseudotranslatetmx=allsegments.tmx --pseudotranslatetype=equal


Legal notices Home Index of contents