Extract
Bilingua reads the file and returns a Document: the translatable text as segments and sentences, with bold, links, placeholders and other formatting kept as numbered inline tags a translator can move but not break.
Bilingua · Open source
Bilingua opens a translation file, hands you its text as segments with the formatting kept as inline tags, and writes the translation back into the same file. 96 formats, in Rust, with a command line tool and a Python package. Apache 2.0.
Under both products
Every file either product opens goes through Bilingua, and every translated file it hands back comes out of it. A fix to a format lands in both at once, and a file that works in one works in the other.
How it works
Bilingua reads the file and returns a Document: the translatable text as segments and sentences, with bold, links, placeholders and other formatting kept as numbered inline tags a translator can move but not break.
The Document is plain JSON, a Python dict or a Rust struct. Send it to machine translation, a human, an agent or a CAT tool. Bilingual formats such as XLIFF, PO and Trados packages come with their existing targets.
Bilingua writes the translations into the original. A file with nothing to translate comes back byte for byte, and packaged formats keep every entry they did not touch.
Hard limits on size, depth and expansion for every format, no external entities, and every stored target checked for tags it should not have before a file is written.
Each format is checked against what the Localization OS filter extracts from the same files, and where the Okapi Framework has a filter, against Okapi's own test files. No Java, no Okapi dependency.
On a server, in a desktop app, from the command line, inside Python, and in the browser through WebAssembly.
Use it
pip install bilinguaOne wheel for every Python from 3.11.
cargo install bilingua-cliExtract to JSON, merge back, batch a ZIP.
cargo add bilinguaThe library both products are built on.
Formats
The highlighted ones are bilingual: they carry source and target, and Bilingua reads the existing translations too.
No format by that name. Ask for it.
Bilingua on GitHub → or see it at work in Localization OS and ChatterCAT