Skip to content

About

Local document translation using Ollama. It allows users to select source and target languages while prioritizing the preservation of the document's original structure. Supported Formats: DOCX, PPTX, XLSX, Markdown (.md, .markdown), and UTF-8 TXT.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Local Document Translator

A desktop application for translating documents locally with Ollama. Document content stays on your computer and the original file is never modified.

Supported files: DOCX, PPTX, XLSX, Markdown, and UTF-8 TXT. PDF and OCR are not supported.

Requirements

  • Ollama
  • The translategemma:4b model described below

Building from source also requires:

Set up Ollama

Install and start Ollama. If it is not already running, use:

ollama serve

In another terminal, download Gemma 3 4B and create the model name used by this project:

https://ollama.com/library/translategemma

ollama pull translategemma:latest
ollama list

Ollama must be available at:

http://localhost:11434

Run from source

Open a terminal in the project directory:

npm ci
npm run tauri dev

The Tauri desktop application will open automatically. npm run dev is the shorter equivalent command.

Use the application

  1. Confirm that the header shows Ollama connected.
  2. Select a supported document.
  3. Choose the source and target languages.
  4. Select translategemma:4b.
  5. Choose an output folder.
  6. Click Start translation.

The output file includes the target language code. For example:

document.docx -> document_en.docx

Existing output files are not overwritten.

Build an installer

Install all dependencies, run the quality checks, and create a release build:

npm ci
npm run check
npm run tauri build

npm run build is the shorter equivalent of npm run tauri build.

Build artifacts are written to:

src-tauri/target/release/bundle/

On Windows, the installers are normally created in:

src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/nsis/*-setup.exe

The first release build can take several minutes because Rust dependencies must be compiled.

ScreenShot

Local Document Translator of the image

Troubleshooting

If Ollama is not detected, confirm that it is running and that the model exists:

ollama list

The list must contain translategemma:4b. If it does not, repeat the commands in Set up Ollama, then click Check in the application.

For format-specific restrictions, see Known limitations.

About

Local document translation using Ollama. It allows users to select source and target languages while prioritizing the preservation of the document's original structure. Supported Formats: DOCX, PPTX, XLSX, Markdown (.md, .markdown), and UTF-8 TXT.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages