Okapi Filters Plugin for OmegaT
OmegaT is a free and open-source translation tool that offers support for many file formats. It also provides a plugin mechanism to use addition filters.
Several of the Okapi filters have been packaged into a plugin that works with OmegaT's plugin interface. This allows you to use the filters seamlessly directly from OmegaT.
Currently support for the following formats are included:
- Doxygen-commented files (using the Doxygen Filter)
- HTML files (using the HTML Filter)
- InDesign IDML files (using the IDML Filter)
- JSON files (using the JSON Filter)
- Markdown files (using the Markdown Filter)
- OpenXML (Office) files (using the OpenXML Filter)
- Qt TS files (using the TS Filter)
- Trados TagEditor TTX files (using the TTX Filter)
- Transifex projects (using the Transifex Filter)
- Wordfast Pro TXML files (using the TXML Filter)
- XLIFF 1.2 documents (using the XLIFF Filter)
- XLIFF 2 documents (see more information)
- XML files (using the XML Filter)
- XML files (using the XML Stream Filter)
- YAML files (using the YAML Filter)
Note that several of the formats supported by the plug-in are also supported by OmegaT native filters. You should select which filter to use by enable/disable it in the File Filters dialog. If several filters are set for a given format, the first one in the list is used by default.
Starting in m24 you can specify a custom filter parameters file for each of the filter that supports options.
Use OmegaT's Options button in the File Filters dialog box to select whether you want to use the default settings, or a custom filter parameters file (
.fprm extension) where you have stored your options.
You cannot create or edit the filter parameters file from OmegaT, but you can use Rainbow to do this (menu Tools > Filter Configurations).
- Starting with 1.5-m36, make sure you are using Java 1.8 or above (OmegaT 3.6 and earlier can run on lower versions of Java).
- Make sure you have OmegaT 2.2.3 or above.
- OmegaT 4.0.0+ requires version 1.0-m30+ of this plugin.
Download and Installation
Download the file
- https://bintray.com/okapi/Distribution/OmegaT_Plugin (for the stable release)
- or http://okapiframework.org/snapshots (for the development snapshot)
To install the plugin:
- Locate your OmegaT
pluginsdirectory (see your platform below).
- Copy the plugin's JAR file to the
- Restart OmegaT.
- Some file formats (like XLIFF, HTML, etc.) have already native OmegaT filters. OmegaT uses the first enabled filter available. So if you want, for example, OmegaT to use the Okapi XLIFF filter rather than the native OmegaT XLIFF filter, make sure to disable (uncheck) the OmegaT native filter in the File Filters dialog (menu: Options > File Filters).
On Windows you can install the plugin to the
plugins directory where OmegaT is installed (e.g.
C:\Program Files\OmegaT) or to your Application Data directory:
- Windows XP:
C:\Documents and Settings\<username>\Application Data\OmegaT
- Windows Vista or later:
Mac OS X
On OS X you are recommended to install the plugin to
Library folder in your home directory may be hidden; to access it from the Finder, select Go > Go to Folder from the main menu and enter
Okapi requires Java 1.7. The Mac-specific version of OmegaT 3.1.9 or later is bundled with Java 1.8, so you don't need to do anything. If you are running a "without JRE" version or an older version, you will have to install Java 1.7 or later and ensure that OmegaT is launched with it.
Linux & BSD
On Linux and BSD you can install the plugin to the
plugins directory where OmegaT is installed (alongside
OmegaT.jar) or to
For the file formats that represent segments, such as TTX, be aware that the segmentation created by OmegaT is not carried back into the translated document. For example, an unsegmented paragraph of two sentences may be translated as two separate segments in OmegaT (and produce two TM entries), but it is merged back as a single paragraph (between segment markers because that is the only way to store translation) in the translated TTX file.
Note that any line-break in the source text is considered a segment break by Trados TagEditor, even when it is within an existing segment. Opening a segment that includes a line-break with TagEditor results in a segment withing segment.
TTX documents may contain segments that are already translated. The translation of such segments is loaded as the current translation in OmegaT.
Note that the target language of the OmegaT project must match the target language specified in the TTX file. The target language of a TTX file is defined in the attribute
TargetLanguage of the
Testing a Filter
Some file formats are difficult to extract and merge. If you want to be sure that the translated file merges back properly and is a valid file. One step toward verifying this is to re-extract the merged file and compare the first extraction with the second.
- Open the original file in OmegaT
- Save it.
- Go to the
targetdirectory and copy the file you have saved some place else.
- Go back to OmegaT and open the file you have just copied.
- Both files should have the exact same source content. If they do not it is likely that the saved file was not generated properly. You should fill a bug report to make sure the problem is corrected.
Support for XLIFF 2
- Only basic core support is implemented
translate='no'attribute in unit or annotations is not supported yet.
canResegment='no'flags are not supported yet.
- Annotations are stripped out
- No module is supported yet
- Existing target is set as OmegaT "fuzzy match" if its status is "initial" or "translated", not fuzzy for "reviewed" and "final".
- Inline codes are mapped to
- Notes are not displayed in OmegaT.
You can find examples of valid XLIFF 2 documents in the SVN repository of the XLIFF TC
With this plugin installed I get an error when opening my OmegaT project
If the error is
java.lang.NoSuchMethodError: org.omegat.filters2.FilterContext.getProjectProperties()Lorg/omegat/core/data/ProjectProperties; then you are using an older version of this plugin with a newer version of OmegaT (see #Requirements). Update your plugin.