DeepL Translate Selection

approved

by fanxin199

Translate selected text with DeepL from the editor context menu. Auto-detects Chinese English direction. - This plugin has not been manually reviewed by Obsidian staff.

1 stars260 downloadsUpdated 1mo agoMIT

DeepL Translate Selection

English | 中文


English

DeepL Translate Selection is an Obsidian plugin that translates selected text with the DeepL API or DeepSeek (OpenAI-compatible LLM). It is designed for quick Chinese-English translation from the editor context menu or command palette.

Features

FeatureDescription
Right-click translationSelect text, right-click, and run DeepL Translate.
Smart language directionDetects Chinese to English or English to Chinese.
Output optionsInsert below, replace the selection, or copy to clipboard.
Command palette supportRun DeepL: Translate Selection from the command palette.
Free and Pro API supportSupports DeepL Free and DeepL Pro API keys.
Quality-optimized modelUses DeepL's quality_optimized model setting.
DeepSeek / LLM translationUse DeepSeek or any OpenAI-compatible LLM as an alternative translation engine.
Professional translation promptBuilt-in system prompt constrains the LLM to produce clean, professional translations.

Installation

From Obsidian Community Plugins

  1. Open Settings -> Community plugins -> Browse.
  2. Search for DeepL Translate Selection.
  3. Click Install, then Enable.

Manual installation

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Create a deepl-translate-selection/ folder in your vault's .obsidian/plugins/ directory.
  3. Copy the three files into that folder.
  4. Restart Obsidian and enable the plugin.

Setup

  1. Get a DeepL API key from deepl.com/pro-api.
  2. Open Settings -> DeepL Translate Selection.
  3. Paste your API key.

Keys ending in :fx are treated as DeepL Free API keys and routed to the DeepL Free endpoint.

DeepSeek setup

  1. Get a DeepSeek API key from platform.deepseek.com.
  2. Open Settings -> DeepL Translate Selection.
  3. Change Translation provider to DeepSeek.
  4. Paste your DeepSeek API key.

The default model is deepseek-v4-flash. You can change it or point the base URL to any OpenAI-compatible endpoint.

Usage

  1. Select text in the Markdown editor.
  2. Right-click and choose DeepL Translate, or run DeepL: Translate Selection from the command palette.
  3. Review the translation in the modal.
  4. Choose Insert below, Replace selection, or Copy.

Settings

SettingDescriptionDefault
Translation providerChoose DeepL or DeepSeekDeepL
DeepL API keyYour personal DeepL API keyEmpty
Request timeoutMaximum request time before failing15000 ms
Fallback target languageTarget language when detection is inconclusiveZH
Model typeDeepL model settingquality_optimized
DeepSeek API keyYour DeepSeek API keyEmpty
DeepSeek modelModel identifierdeepseek-v4-flash
TemperatureControls translation consistency (lower = more consistent)0.3
API base URLDeepSeek or OpenAI-compatible endpointhttps://api.deepseek.com
Custom system promptOverride the built-in translation prompt (advanced)Empty

Privacy and network access

This plugin sends the selected text to the DeepL API or the configured LLM API only when you explicitly run a translation command. It does not perform background translation, analytics, telemetry, or tracking.

API keys are stored locally in Obsidian plugin settings. During translation requests, your key is sent only to the corresponding API endpoint for authentication. Translated text is written to the clipboard only when you choose the Copy action.

DeepL and DeepSeek are third-party services. Use of this plugin may require API accounts and is subject to each service's terms, privacy policy, and usage limits.

For more details, see PRIVACY.md.


中文

DeepL Translate Selection 是一款 Obsidian 插件,用于通过 DeepL APIDeepSeek(OpenAI 兼容 LLM)翻译编辑器中选中的文本,适合在中文和英文之间快速翻译。

核心功能

功能说明
右键翻译选中文本后右键运行 DeepL Translate。
智能方向判断自动判断中文到英文或英文到中文。
三种输出方式插入到下方、替换选中文本、复制到剪贴板。
命令面板支持可通过命令面板运行 DeepL: Translate Selection
Free 和 Pro API支持 DeepL Free 与 DeepL Pro API key。
质量优化模型使用 DeepL 的 quality_optimized 模型设置。
DeepSeek / LLM 翻译使用 DeepSeek 或任何 OpenAI 兼容 LLM 作为备选翻译引擎。
专业翻译提示词内置系统提示词约束 LLM 输出干净、专业的翻译结果。

安装方法

从 Obsidian 社区插件安装

  1. 打开 设置 -> 第三方插件 -> 浏览。
  2. 搜索 DeepL Translate Selection
  3. 点击安装,然后启用。

手动安装

  1. latest release 下载 main.jsmanifest.jsonstyles.css
  2. 在 vault 的 .obsidian/plugins/ 目录下创建 deepl-translate-selection/ 文件夹。
  3. 将三个文件复制到该文件夹。
  4. 重启 Obsidian 并启用插件。

配置

  1. deepl.com/pro-api 获取 DeepL API key。
  2. 打开 设置 -> DeepL Translate Selection。
  3. 粘贴 API key。

:fx 结尾的 key 会被识别为 DeepL Free API key,并路由到 DeepL Free endpoint。

DeepSeek 配置

  1. platform.deepseek.com 获取 DeepSeek API key。
  2. 打开 设置 -> DeepL Translate Selection。
  3. 将翻译引擎切换为 DeepSeek。
  4. 粘贴 DeepSeek API key。

默认模型为 deepseek-v4-flash。你可以更改模型名称,或将 Base URL 指向任何 OpenAI 兼容的 API endpoint。

使用方法

  1. 在 Markdown 编辑器中选中文本。
  2. 右键选择 DeepL Translate,或从命令面板运行 DeepL: Translate Selection
  3. 在弹窗中查看译文。
  4. 选择插入到下方、替换选中文本或复制到剪贴板。

设置选项

设置说明默认值
翻译引擎选择 DeepL 或 DeepSeekDeepL
DeepL API key你的 DeepL API key
请求超时请求失败前的最长等待时间15000 ms
备用目标语言语言检测不确定时使用的目标语言ZH
模型类型DeepL 模型设置quality_optimized
DeepSeek API key你的 DeepSeek API key
DeepSeek 模型模型标识符deepseek-v4-flash
温度控制翻译一致性(越低越稳定)0.3
API Base URLDeepSeek 或 OpenAI 兼容的 API 端点https://api.deepseek.com
自定义系统提示词覆盖内置翻译提示词(高级)

隐私与网络访问

插件只会在用户明确运行翻译命令时,将选中文本发送到 DeepL API 或配置的 LLM API。插件不会进行后台翻译、分析统计、遥测或跟踪。

API key 保存在本地 Obsidian 插件设置中。翻译请求发生时,API key 仅发送给对应的 API endpoint 用于认证。只有当用户选择 Copy 操作时,插件才会把译文写入剪贴板。

DeepL 和 DeepSeek 是第三方服务。使用本插件可能需要相应的 API 账户,并受各服务的条款、隐私政策和用量限制约束。

更多细节见 PRIVACY.md


License

MIT © 2026 Yunfeng

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.