Open XLIFF Translator is a Python library for translating XLIFF files from WPML using HelsinkiNLP from HuggingFace.
To use Open XLIFF Translator, simply install the dependencies using pip:
pip install -r requirements.txt
If you have a CUDA-enabled GPU, you can also install the GPU version of the dependencies:
pip install -r requirements-gpu.txt
Then, you can call the main.py
script to translate your XLIFF files from the command line:
python main.py <input_dir> <output_dir> [--translator <translator>] [--verbose]
By default, the library uses the HelsinkiNLP model from HuggingFace to perform the translation.
If your XLIFF Files are into inputs
and want to output in the translated
, the command will be:
python main.py inputs translated
If you encounter any issues while using Open XLIFF Translator, please feel free to submit an issue using the GitHub Issue Tracker.
Any feedback and/or contributions are welcome!