Enhanced Translator app icon

Enhanced Translator

JavaScript

A browser extension for Chromium-based browsers (Chrome, Edge) that shows dual-language subtitles (original + translation) on any site, not just YouTube or Netflix. It reads whatever subtitles the player already shows (native ``, Netflix-style DOM subtitles, or YouTube's CC) and translates them on the fly. Clicking a word in the original subtitle line opens a small popup with the word's isolated translation, the translation of the full sentence as context, other lines from the same video containing that word, and dictionary definitions/examples.

Translation engine

Two options, chosen automatically based on what you configure in the extension popup:

  • Browser's built-in AI translator (default, no setup): free, on-device, no API key. Requires Chrome 138+ or Edge 148+. Chrome uses the Gemini Nano model, Edge its own model (Phi-4-mini/Aion) — Edge's implementation is newer and in practice less reliable: if you notice the translated line disappearing often, this is almost always why.
  • Google Cloud Translation API (optional, requires your own API key): much more reliable since it's a plain network call, not dependent on the browser or a local model. Configure it by pasting your API key in the extension popup. Requires creating a project at console.cloud.google.com, enabling "Cloud Translation API" and billing (a credit/debit card is needed for verification, but nothing is charged while staying under 500,000 characters/month). Once configured, it's always used as the primary engine; if a request fails (wrong key, quota exhausted), the extension automatically falls back to the built-in browser translator for that line.

Installation (developer mode)

  • Open chrome://extensions.
  • Enable Developer mode (top right).
  • Click Load unpacked and select this folder (10-Translator_Plugin).
  • The extension icon will appear in the toolbar.

Usage

If subtitles aren't detected on a site, try reloading the page after turning on subtitles in the player (some players load the subtitle track late).

  • Open the extension popup (toolbar icon) and pick the subtitle language and translation language (default: English → Italian). If you want to use Google Cloud Translation instead of the built-in translator, paste your API key here. If you want to see only the original-language subtitles without translation, enable "Original subtitles only (hide translation)". If you want automatic dubbing (experimental, free) in the chosen translation language, enable "Audio dubbing": the extension reads the translated line aloud using the browser's speech synthesis, muting the original audio while it speaks — not lip-synced, but free and no API key required.
  • On the site you're watching, turn on subtitles in the original language from the player itself (e.g. YouTube's CC, another streaming site's subtitle menu, etc.) — the extension reads whatever the player is already showing, it doesn't invent anything.
  • Both lines, original and translated, appear at the bottom of the video with equal visual weight, updated together (the translation never lags behind the original).
  • Click a word in the original line to open a popup with: the word's isolated translation, the translation of the sentence it appears in, definitions and real usage examples in English (with their translation) pulled from an online dictionary — useful to see what other contexts the word can be used in.
  • Two buttons sit in the top right of the video: History opens a collapsible panel with every original line seen this session (hover a line to see its translation on the right, click it to jump to that point in the video); Download saves a single .txt file with every line seen so far, alternating original and translated line (with timestamps).
  • YouTube — turn on subtitles (CC) from the player; the extension reads them directly from YouTube's UI, in whatever language you pick.
  • Other streaming sites — open the player's subtitle menu and select the original language (e.g. English); the extension hooks into it via a native `` if present, otherwise by reading the text shown on screen.
  • Netflix and players with subtitles "burned" into the DOM — handled by the generic fallback that watches containers with classes like subtitle/caption.

Project structure

Translation runs in an offscreen extension document (not the site's own page) on purpose: many streaming players load in a third-party iframe whose Permissions-Policy blocks the Translator API, which would silently break only the translation (the original subtitles, which don't use that API, would keep working). The offscreen document is a context owned by the extension and is never subject to the hosting site's policies.