Browse documentation
DocsAPI module

lokit.write & convert

Use the synchronous writer aliases or run focused path-to-path conversions.

01

Synchronous writer aliases

lokit.write is the canonical synchronous writer namespace and lokit.parse.write is the same surface beneath the parser package. lokit.export exposes those writers alongside asynchronous and regeneration namespaces. See the complete export API reference for every output format and option.

write.py
lokit.write.xliff(document, "messages.xliff")lokit.parse.write.tmx(document, "memory.tmx")
02

Direct conversions

The lokit.convert module provides focused path-to-path helpers for common flows: TMX to CSV/JSON/TMX/XLIFF, JSON to TMX/XLIFF, and CSV/XLSX to XLIFF.

convert.py
import lokit
lokit.convert.tmx_to_xliff(    "memory.tmx",    "messages.xliff",    source_language="en",    target_language="fr",)
03

Regeneration makes source preservation explicit

Export always writes a new output path, and some format exporters accept an original file for reinsertion. When the workflow should consistently read as original source plus translated model plus localized output, use document.regen. The regeneration guide covers supported formats, streaming behavior, and async entry points.