Recently, we’ve received a comment from a reader asking how to enable Google Translate (GT) in OmegaT. This post answers their question in detail. It doesn’t imply, of course, that we rely on machine translation (MT) in our regular work for clients. Quite the contrary, we are raving fans of traditional translation and believe MT has a long way to go to before it’s usable beyond basic translation “just for understanding.” Neither does it mean that we use GT to translate documents subject to confidentiality agreements. This how-to is rather designed for those OmegaT users who need MT for very specific applications such as translating and post-editing huge amounts of Internet content. It might be also helpful for in-house translation departments interested in assessing whether MT has any promise for them.
Step 1. Configure Google Translate API
- To use GT in OmegaT, you must enable Google Translate API in your Google account. If you don’t have one, visit this page to sign up.
- Log in and go to Google apis.
- Select Services tab and enable Translate API by clicking it.
- Select API Access tab to generate your unique API key. The generated key will display on this page, e.g. 425gjkdkUofmfbbf41549841FRHBOAHF.
- Select Billing tab and then Google Checkout.
- Add a new payment method, that is your credit card details.
- Check the terms of service checkbox and click Complete your purchase.
- The Billing tab will confirm that billing is enabled.
Step 2. Modify OmegaT launch file
This instruction is based on Windows 7, but should be similar under other operating systems.
- Open OmegaT installation folder. In my case, it is C:Program Files (x86)OmegaT.
- Use a text editor to open the BAT file(s) you use to launch OmegaT. This is the recommended way to launch the program. If you don’t use it, you can’t benefit from a tokenizer, e.g. for English to Russian translation in my case. More information about configuring a BAT file is available here.
- Modify the launch string by adding “-Dgoogle.api.key=your API key” before “OmegaT.jar.” In my case, the entire string is as follows:
java -Xmx1024M -jar –Dgoogle.api.key=425gjkdkUofmfbbf41549841FRHBOAHF OmegaT.jar %* –ITokenizer=org.omegat.plugins.tokenizer.SnowballEnglishTokenizer
- Save the file and double-click it to launch OmegaT.
Step 3. Configure OmegaT Settings
- Select Options > Machine Translate.
- Check Google Translate v2.
GT will charge you $20 per 1 million characters. You can check your usage under Google apis > Billing or Reports. You will be automatically charged at the end of each monthly billing cycle and receive an email notification.
Feel free to ask questions if you have any difficulty following this how-to.