Selection translation
Translate any highlighted text
Highlight text on any page. Swiftin shows a small floating "S" button near your cursor, then a popup with the translation when you click it. The popup also holds an engine picker, language selectors, TTS, and copy buttons, everything on one card.
How a selection translation runs
Two-stage on purpose, selecting text doesn't fire a request, only your click does. Keeps the page quiet when you're reading.
- 1Highlight text with the mouse, `selectionchange` + `mouseup` events fire
- 2A floating "S" button appears near the end of your selection
- 3Click the button, the popup opens in a loading state and the translate request fires
- 4The translation renders inline; engine, language, TTS and copy controls are right there
What's in the popup
One card with everything. No extra menus, no settings page round-trip.
Engine switcher
Switch engine right inside the popup, Google, Bing or any AI brand. The choice persists as your selection engine for next time.
Language selectors
Source language defaults to Auto (server-detected; client-side trigram fallback if the server didn't return one). Target language is searchable.
Speaker icons (×2)
Two speaker buttons, one for the translation, one for the source. See Text-to-Speech for engine and quota details.
Copy + pin
Copy the original or the translation to clipboard. Pin keeps the popup open while you click around the page.
Engine for selection vs page / input
Each surface has its own engine setting. `settings.selectionTranslationEngine` lives independently from page and input. Switching the engine in the popup updates this key, the next selection on a fresh page uses your last choice.
Free plans get Google and Bing for selection. Pro/Team pick any AI brand; BYOK users can plug their own key per brand (see BYOK docs).
Listening to the translation
The popup has a speaker icon next to the translation and another next to the original. Pro/Team accounts get AI voice (Gemini TTS, Kore/Orus voice); Free accounts use the browser's built-in voice for the user's OS. AI-quota exhausted = silent fallback to browser voice. Text-to-Speech →
Where it works (and where it doesn't)
Selection sits on the browser's native Selection API, works wherever the browser hands us text.
Plain HTML pages
Articles, blogs, social feeds, docs, anywhere browser's `window.getSelection()` returns text.
Shadow DOM
The SelectionPopup itself mounts in a closed Shadow DOM (no host-page CSS leaks). Selection inside other Shadow DOMs is captured via `composedPath`.
PDFs & canvas
PDF viewer uses a special rendering surface, selection works only if the viewer exposes text via the DOM. Canvas is bitmap, so no text to select.
Excluded sites
Global excludes (`excludedSites`), selection-only excludes (`selectionExcludedUrls`), and per-host overrides (`siteOverrides[host].selectionDisabled`) each disable the popup. Configure them in Options → Excluded URLs.
Saving selection translations
Off by default. Two switches must both be on: the master `Save translation history` and the per-source `Save selection translation history`. Free plans keep history local-only; Pro/Team can opt in to cloud sync separately. See the History docs. History →
Common issues
If the popup misbehaves on a specific page, check the table below, most cases fix themselves in a click or two.
NO_POPUPPopup doesn't appear
Extension globally disabled, the site is in your excluded list, or you snoozed selection translation. Check Options → General toggle, Excluded URLs, and per-host overrides.
PDF_VIEWERSelection on PDF does nothing
Some PDF viewers expose text to the DOM, some don't. If your viewer doesn't, selection translation can't see the text. Open the PDF in a text-exposing viewer or copy-paste into the input translator.
CANVASText in a canvas / image is ignored
Canvas text is a bitmap, there is no DOM text to select. No fix at the extension level; the site would have to expose text as DOM.
WRONG_LANGAuto-detect picks the wrong source language
Short or mixed text trips the trigram detector. Open the source-language dropdown in the popup and set it explicitly.
SAME_LANG"Already in your target language" message
Auto-detected source equals your target. If detection is wrong, override the source in the popup; otherwise the translation would be a no-op.
ENGINE_FAILEDEngine error badge in popup
Provider rejected the request (quota, auth, rate-limit). Switch engine inside the popup; for BYOK, see the BYOK error table for the exact code.
NO_AI_VOICESpeaker icon plays a poor-quality voice
AI voice quota exhausted or you're on Free, extension falls back to your OS voice. Quality varies by OS. Upgrade or install a better system voice for that language.