Selection Translator

unlisted

by L.

Translate selections, notes, Markdown documents, images, and speech with AI and machine translation providers.

1 starsUpdated 18d agoGPL-3.0
View on GitHub

Selection Translator

Selection Translator is an Obsidian plugin for translating selected text, paragraphs, Markdown documents, embedded images, and speech. It supports both AI translation providers and official machine translation services, with local caching, request queue limits, bilingual reading modes, and a small runtime dashboard.

Features

  • Translate selected text from the editor menu, ribbon menu, or command palette.
  • Translate the current paragraph and show the result in a floating panel.
  • Insert a translated paragraph below the current paragraph.
  • Use a quick translation panel for ad-hoc text.
  • Read Markdown notes with immersive bilingual translations.
  • Open a side-by-side translated Markdown file and keep it synced with the source note.
  • Translate embedded images and insert the translated image below, or replace the image reference in the note.
  • Test TTS providers and read floating translation results aloud.
  • Configure AI providers and official machine translation providers separately.
  • Monitor current-session queue, cache, request, and token usage from the dashboard.
  • Use the interface in Simplified Chinese, English, German, or Japanese.

Supported providers

AI translation:

  • OpenAI
  • OpenAI compatible
  • DeepSeek
  • OpenRouter
  • Gemini
  • Claude
  • Ollama

Machine translation:

  • Google Cloud Translation
  • Azure Translator
  • AWS Translate
  • DeepL
  • DeepLX
  • Baidu
  • Youdao

TTS:

  • Web Speech
  • OpenAI TTS
  • Azure Speech

Image translation:

  • OpenAI Images compatible endpoint with gpt-image-2 or gpt-image-1.5

Quick start

  1. Open Settings -> Selection Translator -> Basic.
  2. Set the interface language and target language.
  3. Open Translation API.
  4. Select a translation provider.
  5. Fill in the required credentials and model.
  6. Select Save configuration.
  7. Select Test translation to verify the provider.

After configuration, use the ribbon icon, editor context menu, or command palette to translate text.

Document translation

Side-by-side translation creates a real Markdown file next to the source note, usually named like:

note.translated.en.md

The plugin keeps the translated file linked to the source note and updates it when the source changes. Generated translated files are intended to be managed by the plugin. If you want to manually edit a translation, copy it to a separate note first.

Image translation

Image translation works on images embedded in Markdown notes. The plugin does not overwrite the original image file.

Available actions:

  • Translate image and insert below
  • Translate image and replace in note

The generated image is saved in the vault next to the original image or source note context.

Privacy and data

Selection Translator does not collect telemetry and does not upload vault contents in the background.

Network requests are made only when you actively use a feature that requires an external service:

  • Text translation sends the selected text, paragraph, or Markdown block to the configured translation provider.
  • Side-by-side and immersive translation send Markdown text blocks to the configured translation provider.
  • Image translation sends the selected image to the configured image translation endpoint.
  • Cloud TTS sends the text to the configured TTS provider.
  • Web Speech uses the browser/system speech synthesis API and does not require an API key.

API keys are stored in Obsidian plugin data. The Hide API keys setting only hides input values on screen; it is not encryption.

Translation cache is stored locally in plugin settings. You can disable or clear it from the Advanced settings tab.

Mobile compatibility

The plugin avoids Node/Electron-only APIs and is marked as mobile-compatible. Provider availability, Web Speech support, and image upload behavior may still vary by platform and network environment.

Manual installation

Copy these files to your vault:

<Vault>/.obsidian/plugins/selection-translator/

Required files:

  • main.js
  • manifest.json
  • styles.css

Then reload Obsidian and enable Selection Translator in Settings -> Community plugins.

Development

npm install
npm run build
npm run lint

Release artifacts are generated at the plugin root and should be attached to GitHub releases individually:

  • manifest.json
  • main.js
  • styles.css

License

GPL-3.0-only. See LICENSE.

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.