Bilingua · Open source

One engine for every file you translate.

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.

Get the code on GitHub → See the 96 formats

Under both products

Localization OS and ChatterCAT read files the same way.

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

Text out, the same file back.

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.

Translate anywhere

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.

Merge

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.

Safe on hostile files

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.

Tested against the reference

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.

Runs where you do

On a server, in a desktop app, from the command line, inside Python, and in the browser through WebAssembly.

Use it

Three ways in.

Python

pip install bilingua

One wheel for every Python from 3.11.

Command line

cargo install bilingua-cli

Extract to JSON, merge back, batch a ZIP.

Rust

cargo add bilingua

The library both products are built on.

Formats

96 formats.

The highlighted ones are bilingual: they carry source and target, and Bilingua reads the existing translations too.

  • Adobe FrameMaker MIF
  • Adobe InCopy ICML and WoodWing WCML
  • Adobe InDesign IDML
  • Advanced SubStation Alpha and SSA subtitles
  • Android string resources (strings.xml)
  • Apple .strings
  • Apple .stringsdict
  • Apple property lists (XML and binary)
  • AsciiDoc
  • ASP.NET pages and controls
  • Atlassian Document Format (Jira, Confluence)
  • AutoCAD DXF (ASCII)
  • Contentful Rich Text (JSON)
  • CSV
  • DITA topics, maps and bookmaps
  • DocBook 4.x and 5
  • DokuWiki markup
  • DTD entity files (Mozilla)
  • EBU STL subtitles
  • Email messages
  • EPUB 2 and 3
  • ERB templates
  • Flutter ARB
  • freedesktop .desktop entries
  • gettext MO (binary)
  • gettext PO and POT
  • Google and Angular XMB
  • Google and Angular XTB
  • Haiku catkeys
  • HTML and XHTML
  • HTML Help index
  • HTML Help project
  • HTML Help table of contents
  • INI and Joomla language files
  • Java and Mozilla .properties
  • Java XML properties
  • JavaScript and TypeScript locale modules
  • JavaServer Pages
  • JSON
  • JSON5 and JSONC
  • LaTeX
  • MadCap Flare project
  • Markdown (CommonMark, GitHub tables)
  • MDX
  • MediaWiki markup
  • memoQ MQXLIFF
  • memoQ package (MQXLZ)
  • Microsoft .NET resx and resw
  • Microsoft Excel
  • Microsoft PowerPoint
  • Microsoft Visio
  • Microsoft Word
  • Mozilla Fluent
  • Notion blocks (JSON)
  • OpenDocument drawing
  • OpenDocument presentation
  • OpenDocument spreadsheet
  • OpenDocument text
  • PDF (text layer, extract only)
  • PHP array language files (Laravel, CodeIgniter)
  • PHP templates
  • Phrase MXLIFF
  • Plain text
  • Qt Linguist TS
  • QuarkXPress Tags
  • Raster images (text layer: PNG, JPEG, TIFF, BMP, GIF, WebP)
  • reStructuredText
  • Salesforce Translation Workbench
  • Sanity Portable Text (JSON)
  • Scenarist Closed Captions
  • Server-side includes (SSI)
  • SubRip subtitles
  • SubViewer 2.0 and MicroDVD subtitles
  • SVG text
  • TOML
  • Trados project and return packages
  • Trados SDLXLIFF
  • Trados Studio project file
  • Trados TagEditor TTX
  • TSV
  • TTML and DFXP subtitles
  • WebVTT subtitles
  • Windows .resjson
  • Windows resource scripts
  • WiX localization
  • Wordfast Pro TXLF
  • Wordfast Pro TXML
  • WorldServer and Idiom XLIFF packages
  • XAML resources (WPF, UWP, WinUI, MAUI, Avalonia)
  • Xcode localization bundle
  • Xcode String Catalog
  • XLIFF 1.2 and 2
  • XML with ITS 2.0 rules
  • XSLT stylesheets
  • YAML (generic, Rails i18n, Symfony)
  • YouTube SBV subtitles

Open source, Apache 2.0.

Bilingua on GitHub → or see it at work in Localization OS and ChatterCAT