Why OpenXLIFF?
OpenXLIFF provides a complete and reliable solution for working with XLIFF 1.2 and 2.x in Java,
covering conversion, validation, merging, and analysis in a single toolkit. It focuses on
clear behavior, predictable results, and support for a wide range of document formats.
Intended Audience
OpenXLIFF is intended for Java developers and localization teams who need reliable XLIFF 1.2 and 2.x
processing.
The points below summarize the main characteristics of the library.
-
Built with current tools
The library uses JDK 21 and Gradle 9. The codebase is simple to build and maintain, without
legacy components.
-
Standards‑oriented
OpenXLIFF generates XLIFF files that follow the official specifications and avoids
vendor‑specific extensions.
-
Full XLIFF 1.2 and 2.x support
The library validates and processes XLIFF 1.2, 2.0, 2.1, and 2.2. It includes checks that go
beyond XML Schema, such as detecting duplicate IDs and invalid language codes.
-
Broad format coverage
OpenXLIFF handles many document types: Office formats, XML vocabularies, software resource
files, subtitle formats, and others. This allows teams to use a single toolset for different
kinds of content.
-
Consistent round‑trip behavior
Conversion and merge operations are designed to preserve structure and content. You can
generate XLIFF, translate it, and merge it back with consistent results, either through Java
code or the command‑line tools.
-
Additional processing tools
Includes utilities for pseudo‑translation, ICE match recovery, statistics, segment approval,
cleanup, TMX export, and batch operations.
-
Straightforward integration
The API is direct and easy to call from Java applications. There is no framework to learn
and no extra configuration.
-
Part of the Maxprograms toolset
OpenXLIFF works well with XLIFF Manager, Swordfish, and the XLIFF Validation Service,
covering the full workflow from document preparation to translation and QA.
Requirements
- JDK 21 or newer is required for compiling OpenXLIFF.
- Apache Gradle 9.0 or newer is required for building.
Building
OpenXLIFF requires a modern Java toolchain for building and development.
- Check out the OpenXLIFF repository from GitHub.
- Point your
JAVA_HOME variable to JDK 21.
- Execute
gradle.
git clone https://github.com/maxprograms-com/OpenXLIFF.git
cd OpenXLIFF
gradle
A binary distribution will be created in the /dist folder.
Convert Documents to XLIFF
You can use the library in your own Java code. Conversion to XLIFF is handled by the class
com.maxprograms.converters.Convert.
If you use binaries from the command line, running .\convert.cmd or
./convert.sh without parameters displays help for XLIFF generation.
Convert XLIFF to Original Format
You can convert XLIFF files created with OpenXLIFF to original format using the class
com.maxprograms.converters.Merge in your Java code.
If you use binaries from the command line, running .\merge.cmd or
./merge.sh without parameters will display the information you need to merge an
XLIFF file.
Validating XLIFF Files
The original XLIFFChecker supported XLIFF 1.0, 1.1, and 1.2. The version included in OpenXLIFF also
supports XLIFF 2.0, 2.1, and 2.2.
All XLIFF 2.0 modules are validated using XML Schema validation.
Standard XML Schema validation does not detect the use of duplicated 'id' attributes, wrong
language codes and other constraints written in the different XLIFF specifications.
Extra validation is performed for XLIFF 2.0 Core and for Metadata, Matches and Glossary
modules.
You can use the library in your own Java code. Validation of XLIFF files is handled by the
class com.maxprograms.validation.XLIFFChecker.
Translation Status Analysis
The library can generate an HTML report with word counts and segment‑status statistics.
If you use binaries from the command line, running .\analysis.cmd or
./analysis.sh without parameters displays help for statistics generation.
You can generate statistics using your own Java code. Statistics generation is handled by the
class com.maxprograms.stats.RepetitionAnalysis.