Document Translator¶
The Document Translator is a web-based application for translating texts and documents between several languages. Inputs can be provided either as files (PDF, DOCX, Markdown, plain text) or directly via a text field; outputs are available as Word, Markdown or HTML documents. The translation itself is performed via a configurable, OpenAI-compatible LLM endpoint. A defining trait is the unified processing pipeline: regardless of the input format, content is first converted into a structured Markdown representation, then translated section by section with context being passed forward, and finally rendered back into the chosen output format. Tables, code blocks and headings are preserved structurally throughout this process.
At a glance¶
- Translate longer Word and PDF documents in full, without having to manually break them into sections
- Choose the style of the target text during translation — for example academic, professional, plain language or technical
- Switch between formal (Sie) and informal (du) address for German target translations
- Keep specialised terminology consistent via a custom glossary
- Find the tables, lists and code blocks from the original document preserved in the translation
- Switch between more than ten languages, including automatic detection of the source language
- Download the result as Word, Markdown or HTML
Highlights¶
In contrast to a single direct LLM prompt or a simple translation script, the application is designed to process complete documents while preserving structure, keeping terminology consistent and carrying context forward across sections. The following characteristics shape the result:
- Handling of large documents — Long Word and PDF files are not processed as a single prompt but split into token-based sections that are translated in parallel. This makes it possible to process documents that exceed typical context windows in a single run.
- Context-aware chunk translation — When translating a section, the model receives summaries of the previously translated sections as well as the current document heading as context. Terms, references and style remain consistent across long texts.
- Style and address-form control — In addition to a mode that preserves the original style, several target styles are available (academic, professional, plain language, technical). For German as the target language, the user can switch between formal and informal address.
- Unified pipeline for all formats — PDF, Word, Markdown and plain text follow the same processing path through a Markdown intermediate representation. The application thus delivers comparable results across formats.
- Table-aware processing — Markdown tables are recognised as cohesive units; their structure is validated, headers and data rows are translated separately, and the table is then reconstructed faithfully.
- Glossary for consistent terminology — User-defined term pairs can be supplied before translation and are applied across all sections.
- Three groups of external interfaces — Input formats (PDF, DOCX, TXT, MD), export formats (Word, Markdown, HTML) and a configurable LLM endpoint following the OpenAI standard.
- Structure preservation across the entire pipeline — Headings, lists, tables, code blocks and emphasis are recognised during Markdown conversion and rendered back as the corresponding structural elements in the translation.
- Parallel processing with retry logic — Multiple sections are sent to the LLM endpoint concurrently; failed requests are retried with exponential backoff without aborting the overall run.