jimmysu0309/shinkansen

快速、流暢的網頁及 YouTube 字幕翻譯擴充功能。支援 8 種目標語言與多種 AI 引擎,資料不經過第三方

What it solves

Most web translation tools send your browsing content to a third-party server, so you can't control what happens to your data. Shinkansen is a browser extension that translates web pages, documents, and video subtitles while keeping your browsing data private: settings and translation caches stay only in your browser, and translation requests go directly from your browser to the translation service you choose (by default, Google Gemini using your own API key) — no third-party server in between. The source code is fully public, so anyone can inspect its security.

How it works

Shinkansen replaces the text on a web page in place, preserving the original fonts, sizes, colors, and layout — links stay clickable, bold and italic stay intact. It supports 8 target languages (Traditional/Simplified Chinese, English, Japanese, Korean, Spanish, French, German) and three translation engines: Gemini (AI translation, best quality, needs an API key), Google Translate (free unofficial endpoint, no API key, faster), and custom OpenAI-compatible models (e.g., OpenRouter, Together, Groq, Ollama local).

Translations appear within about a second of pressing the shortcut, streaming in as the API responds. Translated segments are cached locally (keyed by original text, target language, model, glossary, and prompt settings) so re-opening the same page costs nothing. A second cache layer uses Gemini's implicit context cache to discount repeated prompt prefixes. After each translation, a notification shows token usage, cost, and cache hit rate.

Beyond web pages, it translates documents (PDF, EPUB, Word, TXT, Markdown, HTML, subtitle files) entirely in your browser, and translates subtitles on YouTube, Google Drive, and X (Twitter) videos in real time, matching the native subtitle style. It also offers hover translation (hold a modifier key and hover over a paragraph), a fixed terminology glossary, a forbidden-words list, three customizable shortcut presets, cross-tab translation continuation, and auto-translation for specified sites.

Who it's for

People who read a lot of foreign-language content online — news, forums, articles, academic papers, e-books, or videos with subtitles — and care about privacy and cost. It suits both casual readers (free Google Translate engine, no API key needed) and power users who want high-quality AI translation with their own Gemini API key, custom models, terminology control, and usage tracking.

Highlights

  • Privacy-first design: no third-party server; requests go straight from your browser to the translation service; source code is fully open.
  • In-place translation preserves layout: fonts, sizes, colors, links, bold/italic all stay intact.
  • Three engines: Gemini (best quality, needs API key), Google Translate (free, no key), custom OpenAI-compatible models (OpenRouter, Together, Groq, Ollama local, etc.).
  • 8 target languages with a shared setting across web, document, and subtitle translation.
  • Document translation: PDF (layout preserved, downloadable translated PDF), EPUB (full-book glossary, chapter selection, bilingual output), Word (.docx written back to the original file), TXT/Markdown/HTML, and subtitle files (SRT/WebVTT/ASS) with timestamps preserved.
  • Video subtitle translation: YouTube, Google Drive, and X (Twitter) videos, with AI-based sentence regrouping for auto-generated captions and optional bilingual display.
  • Hover translation: hold a modifier key and hover over a paragraph to translate just that paragraph.
  • Fixed terminology glossary (global and per-domain, with path scoping) and a forbidden-words list (e.g., 26 default entries for Traditional Chinese Taiwan) injected into the system prompt.
  • Cost-saving features: two-layer caching, translate-only-the-article-opening mode, and a live cost report after each translation.
  • Usage tracking with charts and CSV export; edit translations directly on the page; send translated articles to Instapaper.
  • Cross-tab continuation: open a link from a translated tab and the new tab auto-translates with the same preset.
  • Performance: stress-tested on a ~1000-paragraph Wikipedia article — memory grew only ~8 MB, page stayed responsive, and full-page translation cost under $0.08 with the cheapest model.

Related

  • Project
  • Project
  • Project
  • Project
  • Project