{
  "id": 6831644,
  "title": "LingoGeek: translating whole documents offline with CTranslate2 and a Python desktop app",
  "url": "https://urgent.news/2026/09/12/lingogeek-translating-whole-documents-offline-with-ctranslate2-and-a",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-12T00:31:23.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/techygeeks1/lingogeek-translating-whole-documents-offline-with-ctranslate2-and-a-python-desktop-app-22b5"
  },
  "original_language": "en",
  "account": "LingoGeek offers a desktop application that translates entire documents, including .docx and PDF files, while preserving their formatting and layout. Unlike traditional translation sites, LingoGeek keeps documents intact by returning them in their original file type, whether that be .docx or PDF. The application also supports subtitles, maintaining their timing and cue numbers.\n\nThe need for LingoGeek arose from the limitations of online translation platforms. When a user uploads a document to such a site, the formatting often becomes distorted, requiring manual reformatting. This is particularly problematic for legal or medical documents, where accurate formatting is crucial.\n\nLingoGeek addresses this issue by performing the translation locally on the user's device. This approach not only ensures the document's integrity but also eliminates the need for per-word charges typically associated with online translation services. The developer chose Python as the programming language for the application, utilizing a desktop app built with pywebview, combined with FastAPI and uvicorn for server-side handling.\n\nThe translation process involves complex handling of document structures, especially for word documents where a single sentence can be split across multiple runs with varying formatting. The application effectively translates these documents while reapplying the original formatting. The tech stack also includes ctranslate2, sentencepiece, python-docx, pypdf, and pydantic for various tasks, including inference and document handling.\n\nThe application is still in its early stages, with some limitations including the lack of code signing for the installer and difficulties with complex PDF layouts. The developer is open to suggestions for new language pairs to add to the application. For more information, users can visit the LingoGeek website at https://techygeekshome.info/lingogeek/ or check out the GitHub repository at https://github.com/techygeekshome/LingoGeek. A video demonstration is available at https://youtu.be/hOF9UWpFFd8.",
  "summary": "Hi DEV! Pasting a document into a translation site works right up until the formatting matters. Then you get a wall of text back and rebuild the layout by hand. And if the document is a contract or a medical letter, you have just uploaded it to somebody else's server to save yourself ten minutes. LingoGeek translates the file rather than the text: .docx comes back as .docx, with headings, tables…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}