Howto - Using Google Translate in OmegaT

OmegaT HowTo:
Using Google Translate in OmegaT

Besides the web page into which users can simply paste text for translation, Google Translate also provides an interface (API) which can be used by CAT tools to access the service. As of December 2011, Google has required payment from users for use of this service. This HowTo describes how to configure the function in OmegaT.

1. If you don't already have one, open an account with

2. Follow this link to apply to Google for the Google Translate API v2 key. Make sure that you have your credit card details handy. Google will generate your API key, a string with approximately 39 characters.

3. Assign the key to OmegaT's launch procedure as follows, depending upon whether you are using Windows, Mac, or launching OmegaT from the command line or by means of a script:

Windows users:

3.1. Locate the configuration file OmegaT.l4J.ini (the default location is C:\Program Files (x86)\OmegaT).

3.2. To edit this file, you may need Administrator mode, or to move it temporarily to a different location on your hard drive.

3.3. Open OmegaT.l4J.ini in a plain-text editor

3.4. Add the following line to the text in the file:


(where "XXXXXXXX" is the API key provided by Google).

3.5. Save OmegaT.l4J.ini (and if necessary, move it back to the OmegaT folder).

Mac users:

3.6 Right-click on and select "Show Package Contents".

3.7 Right-click on the file Info.plist and select your preferred editor to open the file.

3.8. Find the lines:



and immediately after them, add the lines:



where "XXXXXXXX" is your Google Translate API key.

3.9 Save Info.plist.

Users launching OmegaT from the command line or by a script:

3.10 Add the following argument to the launch command:


where "XXXXXXXX" is your Google Translate API key.

The basic launch command with the Google Translate API added will therefore be:

java -jar -Dgoogle.api.key=XXXXXXXX OmegaT.jar

4. Configuration in OmegaT

4.1. Launch OmegaT

4.2. Select Options > Machine Translate

4.3. Check Google Translate v2 (leaving the other options unchecked)

5. Note:

5.1 Google Machine Translation is a paid service (US$20.00 per million characters). You can check the daily usage from your Google account. In the upper menu:

More > Even More > Innovation/Code > APIs Console > Service/Translate API

Copyright Milan Hubacek and Marc Prior 2011