Mouse Tooltip Translator

unlisted

by ときくん

Inspired by 'Mouse Tooltip Translator' Chrome extension. Hover to translate.

14 starsUpdated 2mo agoMIT
View on GitHub

Mouse Tooltip Translator

"Read effortlessly, learn instantly." A translation plugin for Obsidian that completes your reading and learning with just a mouse hover.

Mouse Tooltip Translator downloads - latest release GitHub Repo stars GitHub release (latest by date including pre-releases)

日本語版 README はこちら


Screenshot Screenshot

Three Key Strengths

1. Hover Translation That Keeps You in the Flow

No need to switch to a browser. Simply hover over a word or sentence and a popup instantly shows its meaning. Leverages Google's dictionary feature (POS) to display parts of speech, detailed definitions, and transliteration.

2. A Hybrid Engine for Every Use Case

Speed — Blazing-fast Google / Google GTX / Google V2
Precision — Reliable DeepL / Bing / Yandex / Papago / Baidu
Context — Context-aware LLM (OpenAI / Claude / Gemini / Grok / Groq / OpenRouter / GitHub Models / Ollama / LM Studio)

Assign the best engine independently for hover, text selection, and full-page translation.

3. A Vocabulary Book That Turns Reading into an Asset

Every lookup is automatically accumulated in a sidebar vocabulary book. Sort by view count, last reviewed date, or alphabetical order, and filter between words and sentences for efficient review.


What's New in v1.3.8

  • Enhanced page translation: Added reverse-lookup feature — hover over a translated paragraph to see the original text in a tooltip
  • LLM support: Local AI translation via Ollama / LM Studio, and support for OpenAI-compatible APIs
  • Smart filter: Option to hide tooltips when source and target language are the same or when translated text is identical to input
  • Temperature setting: Adjust generation randomness per LLM engine

Features

  • Hover translation for words and sentences
  • Translation of selected text
  • Full-page translation in Reading View
  • Translation history / Vocabulary book — view and sort all past translations in a sidebar panel
  • Choose trigger: mouseover / text selection / both
  • Choose hover unit: word / sentence
  • Per-context engine selection — assign different engines for hover, selection, and page translation
  • 9 translation engines supported
  • Auto-detection of source language
  • Configurable hover delay
  • Display of dictionary entries (with parts of speech)
  • Display of transliteration / romanization
  • Display of source text
  • Display of detected language information
  • In-memory translation cache (fast re-lookup)
  • Restrict to note content — option to limit translation to editor/preview only
  • Skip same-language — hide tooltip when source and target language match
  • Skip identical translations — hide tooltip when translation result matches input
  • Automatic application of Obsidian theme colors
  • Command palette support:
    • Hide tooltip
    • Toggle translation on/off
    • Translate selected text
    • Translate current page
    • Restore original (page translation)
    • Open vocabulary book

Usage

  1. Enable the plugin in Obsidian
  2. Open plugin settings
  3. Select a translation engine and target language
  4. Hover over a word or select text to show a translation tooltip

Press Esc to close the tooltip.

Page Translation

Switch to Reading View, then click the language icon (🌐) in the view header or run the "Translate current page" command. A progress bar is displayed while each block is being translated. Click the icon again (or run the "Restore original" command) to revert. You can also cancel the translation with the ✕ button on the progress bar.

After translation, hover over any paragraph to see the original text in a tooltip.

Vocabulary Book

Click the book icon in the ribbon or run the "Open vocabulary book" command to open the sidebar panel. All past translations are listed with their view counts, and can be sorted by view count, last reviewed date, or alphabetical order, and filtered by words or sentences.


Settings

SettingDescription
EnabledMaster switch for translation
Restrict to note contentRespond only within note body (editor / preview / embeds). When disabled, translates across the entire Obsidian UI
Hover engineEngine used for mouseover translation
Selection engineEngine used for text-selection translation
Page engineEngine used for full-page translation
Translate fromSource language (includes auto-detect)
Translate toTarget language
TriggerMouseover / selection / both
Mouseover unitTranslate the word or sentence under the cursor
Hover delayWait time before translation starts
Tooltip placementOpen the tooltip above or below the hovered text
Show dictionaryDisplay dictionary-style results when available
Show transliterationDisplay transliteration / romanization
Show source textDisplay original text in the tooltip
Show detected languageDisplay detected source and target language
Skip same-language translationsHide tooltip when detected language matches target language
Skip identical translations (strict)Also hide tooltip when translation result is identical to input
Fallback translator engineRetry a failed request with another engine (Google / Bing / Baidu), temporarily benching the failed one
Disable translation cacheCall the API every time, bypassing the in-memory cache

Translation Engines

The engine list fully mirrors the reference Chrome extension (v0.1.246). The default engine is google.

Experimental engines may stop working due to upstream service changes.

EngineNotes
googleDefault. Supports dictionary entries and transliteration
bingWeb endpoint
LLM - OpenAI / Claude / Gemini / LocalOpenAI-compatible chat completions with provider presets (see below)
deeplExperimental web endpoint
yandexExperimental web endpoint
baiduExperimental web endpoint
papagoExperimental web endpoint
browser APIChromium built-in Translator API (requires Chrome 138+ runtime; may be unavailable in Obsidian)
googleWebImageShows the first Google image search hit for the hovered word
googleGTXAlternative Google endpoint
googleWebGoogle dictionary definition ("meaning:") scrape
googleV2Google batchexecute endpoint

LLM Engine Settings

When the LLM engine is selected for any context, the following additional settings appear.

SettingDescription
LLM ProviderCustom / OpenAI (ChatGPT) / Claude (Anthropic) / Gemini (Google) / Grok (xAI) / Groq / OpenRouter / GitHub Models / Ollama (local) / LM Studio (local). Choosing a preset fills in the endpoint URL; settings per provider are remembered and restored when switching
LLM API Endpoint URLOpenAI-compatible base URL including the version path (e.g. https://api.openai.com/v1). Editable only for Custom
LLM API KeyAPI key (leave blank for local servers)
LLM ModelModel name. The ↻ button fetches the model list from the endpoint using the API key so you can pick one

Installation

Community Plugins (Recommended)

Go to Obsidian Settings → Community plugins → Browse, search for Mouse Tooltip Translator, and install.

Manual Installation

  1. Download main.js, manifest.json, and styles.css

  2. Place them in:

    <your vault>/.obsidian/plugins/mouse-tooltip-translator/
    
  3. Restart Obsidian or reload the plugin

  4. Enable Mouse Tooltip Translator from Community plugins


Requirements

  • Obsidian desktop app
  • Minimum version: 1.12.0

This plugin is desktop-only.


Notes

  • Translation requests are sent to the selected translation service.
  • Obsidian's requestUrl API is used for network requests.
  • Experimental engines may become unstable due to upstream service changes.
  • Translation history is saved in translation-log.json inside the plugin folder.

License

MIT License


Inspired by the Mouse Tooltip Translator Chrome extension.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.