The Okapi XLIFF Toolkit project provides a Java library to create, read, write and manipulate XLIFF 2 documents.
Getting the library
The library comes in the form of the Java jar file named
<version> is the version (e.g.
1.0). The latest development version has a '-SNAPSHOT' suffix, e.g:
1.1-SNAPSHOT. You can get the library:
- by downloading the toolkit:
- Latest release: https://bintray.com/okapi/Distribution/Okapi_XLIFF_Toolkit
- Latest snapshot: okapi-xliffLib_all-platforms_<version>.zip
- or if you are using Maven, by adding the following dependency to your POM:
<dependencies> <dependency> <groupId>net.sf.okapi.lib</groupId> <artifactId>okapi-lib-xliff2</artifactId> <version>1.1.9</version> </dependency> </dependencies>
Up to version 1.1.7 you need Java 7 or higher to use the library. Starting at version 1.1.8 you need Java 8 or higher. Once the library in place, working with XLIFF 2 documents is quite easy. The library allows you to create new documents, read existing ones, modify them and re-write them as needed.
The current version of the library implements the Core, the Translation Candidates module, the Glossary module, the Metadata module and the Validation module. The modules not directly supported yet can be accessed like extensions.
Getting XLIFF 2.0 examples files