Command Line Arguments

OmegaT can be run with extra arguments that alter the behaviour of OmegaT or that tell OmegaT what actions to do on startup. To add the arguments, you need to type the startup commands with the arguments on the command line, or you have to alter the script that does that for you. For more information how to start OmegaT, see Installing and Running.

Behaviour altering arguments

Arguments that alter the behaviour of OmegaT are in fact arguments to the java virtual machine.
Arguments are added after the initial "java", and before the "-jar OmegaT.jar" part. Note that in Windows you can change the OmegaT.l4J.ini file to reflect your preferences. On Mac OSX, you can change the Info.plist located in OmegaT.app/Contents/ to do the same.

A list of possible arguments is given below. You can have more information about the arguments by typing java or man java in the terminal window - man is a terminal window command that displays a manual of the selected command. Your system may or may not have a manual for the command java in your language.

User interface language:  -Duser.language=XX

     

Normally, i.e. when OmegaT is launched without any arguments, the program first detects the language of the user's operating system. If a user interface in this language is available, OmegaT uses it. So, if the user's operating system is Russian and OmegaT has been localized in Russian, OmegaT is displayed with a Russian user interface, Russian menus, etc. If the language of the user's system is not available, OmegaT defaults to English. This is the standard behaviour.

The "-Duser.language=XX" argument causes OmegaT to use the language specified rather than the language of the user's operating system. "XX" in the command stands for the two-digit code of the desired language. To launch OmegaT with a French interface (for example on a Russian operating system), the command would therefore be:

java -Duser.language=fr -jar OmegaT.jar

User country setup: -Duser.country=XX

     

Next to the language, you can also specify the country, for example CN or TW in case of the Chinese language. To get the correct Instant start guide, you need to specify both the language and the country. This is necessary even if there's only one combination available, like pt_BR in case of Portuguese / Brazil.

Font antialiasing: -Dswing.aatext=true

     

This argument effects anti-aliasing of the fonts, thereby improving their appearance.

Font antialiasing (Java 6 onwards) : -Dawt.useSystemAAFontSettings=XX

     

 Possible values for "XX" are "false", "on", "gasp" and "lcd". Linux users may find that, depending upon the font type and size selected, "on" or "lcd" enhance the appearance of fonts.

Memory assignment: -XmxZZM

     

This command assigns more memory to OmegaT. By default, 256 MB are assigned, so there is no advantage in assigning less than this figure. "ZZ" stands for the amount of memory assigned, in megabytes. The command to launch OmegaT with assignment of 1024 MB (1 gigabyte) of memory is therefore:

java -Xmx1024M -jar OmegaT.jar

Proxy server address and port: -Dhttp.proxyHost=<server IP address> -Dhttp.proxyPort=<port number>

     

This command defines a proxy server, to be able to access the Internet from behind a proxy.

java -Dhttp.proxyHost=192.198.1.1 -Dhttp.proxyPort=3128 -jar OmegaT.jar

Arguments can be combined: to launch OmegaT with all the examples described above, the command would be:
java -Dswing.aatext=true -Duser.language=pt -Duser.country=BR -Xmx1024M -Dhttp.proxyHost=192.198.1.1 -Dhttp.proxyPort=3128 -jar OmegaT.jar

Action arguments

The following commands tell OmegaT what to do. They have to be placed AFTER the "-jar OmegaT.jar" part. You have to add the arguments to the startup script / shortcut or type them on the command line yourself. You can not put them in a config-file like the behaviour altering arguments.

<project-dir>

tells OmegaT to load the specified project on startup. E.g. /home/user/omegat_projects/myProject or "C:\Localization Projects\myProject".

--config-dir=<config-dir>

 allows to tell OmegaT in which directory the configuration files are stored. If not given, OmegaT reverts to default values (OmegaT dir under user home, or if not available: the current working directory).

--mode=[console-translate | console-createpseudotranslatetmx]

 OmegaT starts in console mode. If mode is console-translate it will translate the given project. If mode is createpseudotranslatetmx it will create a transation memory file (specified by parameter --pseudotranslatetmx) that includes all segments of the project, even those segments that were not translated before. The translation of the segments depends on the parameter --pseudotranslatetype. The translation memory equals the OmegaT format, and thus can be used in OmegaT. See also Translation memories

--source-pattern=<regular expression>

 Only valid when mode is console-translate. Specifies which source files will be translated. Target subdirectories are however created regardless of whether some source files match or not. The parameter is a regular expression. Examples:

  • .*: all files will be translated. This is equivalent to not using the parameter.
  • .*\.html: all HTML files will be translated.
  • dir-10\\test\.html: only the file test.html in the directory dir-10 will be translated. Directories are relative to the root of the source directory of the project. The directory separator is platform dependent. \\ has to be used under Windows, and / on other platforms.
  • test\.html: only the file test.html at the root of the source directory will be translated. If there are other files named test.html in other directories, they will be ignored.

The parameter is optional and defaults to .*.

--pseudotranslatetmx=<file.tmx>

 Only valid when mode is console-createpseudotranslatetmx. Specifies to which file the translation memory is written. If the filename does not end with .tmx it will add the extension. The name can be either absolute or relative to the working directory (the directory you start OmegaT from).

--pseudotranslatetype=[empty|equal]

 Only valid when mode is console-createpseudotranslatetmx. Specifies what kind of translation is created for each segment. Possible values are:

  • empty: the target segment will be an empty segment
  • equal: the target segment will be equal to the source segment.

The parameter is optional and defaults to equal.

--quiet

 Only valid in console-mode. In quiet mode, less info is logged to the screen. All messages that you would usually find in the status bar are not shown.

The parameter is optional and by default messages are logged to the screen.


Legal notices Home Index of contents