Skip to content

Privacy-focused translation using local LLMs (Ollama, LMStudio).

Notifications You must be signed in to change notification settings

Eldoprano/offline-browser-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local LLM Translator

A privacy-focused browser extension that translates web pages using local LLMs (Ollama or LMStudio). Your data never leaves your machine.

Features

  • 🔒 100% Private - All translations happen on your local machine via Ollama or LMStudio
  • 🎯 Smart Prioritization - Visible content and headings are translated first
  • 🌍 Many Languages - Supports many many languages :3

Requirements

You need one of these running locally:

  • Ollama (default: http://localhost:11434)
  • LMStudio (default: http://localhost:1234)

With a translation-capable model loaded (e.g. TranslateGemma, tencent.hunyuan-mt, qwen3, etc.)

Installation

Firefox / Mullvad Browser

  1. Go to about:debugging#/runtime/this-firefox
  2. Click Load Temporary Add-on
  3. Select the manifest.json file

Chrome / Chromium

  1. Go to chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked
  4. Select the extension folder

Coming Soon: Extension in Chrome Web Store and Firefox Add-ons

Preview

Extension Screenshot

Usage

  1. Click the extension icon
  2. Select a model from the dropdown
  3. Choose your target language
  4. Click Translate Page

The extension will:

  • Extract all visible text from the page
  • Prioritize headings and visible content
  • Translate in batches with progress percentage
  • Auto-translate new content (infinite scroll)

Privacy

This extension is designed to be privacy-focused:

  • ✅ Only connects to localhost - no external network requests
  • ✅ No analytics or tracking
  • ✅ No data collection
  • ✅ Minimal permissions (only localhost host permissions)

Settings

Click Advanced Settings to configure:

Setting Description
Provider Auto-detect, Ollama only, or LMStudio only
URLs Custom endpoints for Ollama/LMStudio
Max tokens/items per batch Control batch sizes
Temperature Model creativity (lower = more consistent)
Request Format (work in progress) Default JSON, Hunyuan-MT, Simple, or Custom
Show Glow Toggle visual indicator on translated text

File Structure

├── manifest.json      # Extension manifest (MV3)
├── background.js      # Background script (LLM API, settings)
├── content.js         # Content script (DOM manipulation)
├── popup/
│   ├── popup.html     # Popup UI
│   ├── popup.css      # Styles (Everforest Dark theme)
│   └── popup.js       # Popup logic
└── icons/             # Extension icons

Development

The codebase is intentionally simple with no build step or dependencies:

  • Pure vanilla JavaScript
  • No external libraries
  • No bundler required
  • Works directly in the browser

License

MIT

About

Privacy-focused translation using local LLMs (Ollama, LMStudio).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published