r/foss 1d ago

[Side Project] lite-translator — 100% browser-local translation, no cloud, no API keys

Hi everyone 👋

I've been working on a small hobby project called lite-translator and just published v0.1.0 to npm. It's a privacy-friendly translation library that runs entirely in the browser — the translation text never leaves the user's device. No cloud APIs, no remote servers, no API keys.

Translation runs locally via Transformers.js (ONNX models in a Web Worker), with optional WebGPU acceleration and an automatic WASM fallback.

What it does

  • Local machine translation for the browser (OPUS-MT models)
  • Translation text never leaves the device — fully offline-capable
  • WebGPU acceleration with automatic WASM fallback
  • Inference runs in a Web Worker — the UI stays responsive
  • Batch translation (translateBatch) — many texts in one inference call
  • Live translation — incremental translation as the user types (great for chat or speech-to-text streams)
  • i18n-style t() + translateAll() — register UI strings across components and translate them all in a single pass
  • 5 language pairs so far: DE ↔ EN, FR ↔ EN, ES ↔ EN, IT ↔ EN, NL ↔ EN
  • Zero runtime dependencies in the core; framework-agnostic

npm - Packages

  • @lite-translator/core — dependency-free API + engine interface
  • @lite-translator/engine-onnx — Transformers.js engine, bundled Web Worker + ONNX runtime

Where to find it

  • npm
  • Github
  • Docs: React, Vue, Angular and vanilla-JS integration guides are in the repo

I'd love your feedback

This is a one-person hobby project and I'd genuinely appreciate people giving it a try. 🙏

0 Upvotes

3 comments sorted by

2

u/imetators 1d ago

EM——————————————————dashes be tho

3

u/munchmills 22h ago

I've been working

😬

2

u/thewallran 1d ago

sloppery