Actify57 downloadsTranslate selected PDF words and passages with your own OpenAI-compatible model, alongside PDF++.
Translate selected words and passages while reading PDFs in Obsidian. Bring your own OpenAI-compatible Chat Completions endpoint and model. Works with Obsidian's built-in PDF viewer and alongside PDF++.
中文说明 · Download · Report a problem
The settings interface supports Simplified Chinese and English. The reading popover remains in Simplified Chinese. Target translation language is independent of the settings interface language and defaults to Simplified Chinese.
The plugin is free and MIT licensed. A hosted model provider typically requires a separate account, API key and paid usage. A local service that permits requests without authentication can be used without a key.
Open the community listing and choose Add to Obsidian, or search for PDF Selection Translator under Settings → Community plugins → Browse. GitHub may have a newer release while the directory reviews an update.
For manual installation:
pdf-selection-translator-0.2.1.zip from Releases.pdf-selection-translator folder into <vault>/<config-dir>/plugins/. The default config directory is .obsidian.main.js, manifest.json and styles.css.Alternatively, download the three individual release assets into the same plugin folder. You do not need Node.js or npm to use the plugin.
Open the plugin settings or run PDF Selection Translator: 打开翻译设置 in the command palette.
| Field | Value |
|---|---|
| 接口地址 | Your provider's Base URL or full /chat/completions endpoint. |
| 模型名称 | The exact model ID from your provider. |
| API Key | Your provider's API key. Leave empty only for a service that allows it. |
| 目标语言 | Target language, such as 简体中文 or English. |
Click 测试翻译 to send a fixed example sentence. This is a real model call and may incur provider charges.
In version 0.2.0, enter the endpoint and API key, then click 获取模型 / Fetch models. Select a returned model, or enter the model ID manually if the service does not expose a compatible model list. Fetching uses GET /models under the same API prefix, including when a full /chat/completions endpoint is entered. It sends no paper text and makes no trial generation calls. Listed models are reported by the service; listing alone does not prove Chat Completions support or sufficient quota. Use Test translation to verify your selection.
The target-language dropdown offers 16 presets plus Custom. Existing custom values are preserved. 界面语言 / Interface language switches all open settings forms immediately without changing the target translation language. Model lists remain in memory and are invalidated when the endpoint or key changes.
Example URL handling:
| Entered URL | Request URL |
|---|---|
https://api.example.com |
https://api.example.com/v1/chat/completions |
https://api.example.com/v1 |
https://api.example.com/v1/chat/completions |
https://api.example.com/custom/v1 |
https://api.example.com/custom/v1/chat/completions |
https://api.example.com/chat/completions |
Unchanged. |
http://127.0.0.1:1234/v1 |
http://127.0.0.1:1234/v1/chat/completions |
These are format examples, not model service recommendations. Keys are sent in the Authorization: Bearer ... header. Query parameters and credentials embedded in the URL are not supported.
Click the status-bar label 译 · 自动 / 点击 / 快捷键 to switch between automatic and click modes.
data.json; that file may be included in your configuration sync or backups. Turning the option off removes the saved key while keeping it available for the current session./chat/completions requests. Native Responses API, Anthropic Messages API, custom authentication headers and extra provider-specific parameters are not supported in this version.The selection popover, copying, whole-line selection and PDF++ context menu behavior have been exercised on Windows with Obsidian 1.13.7 and PDF++ 0.40.31, using a loopback mock service. Automated tests cover selection handling, request cancellation, stale results, errors, caching and real local HTTP transport. This is not a provider-by-provider compatibility or translation-quality certification. macOS and Linux have not been manually tested.
Use Node.js 22 or later:
npm ci
npm run check
The check runs TypeScript validation, the test suite, a production build and release-asset validation. Installable files are written to dist/pdf-selection-translator/. Tests use synthetic text and local mock servers; no paid model key is needed.
Release tags must exactly match manifest.json, for example 0.1.2 without a v prefix. Attach main.js, manifest.json and styles.css individually, even when also providing a ZIP. Update package.json and versions.json with the release version.
MIT — Copyright 2026 xfrrn.
This is an independent plugin, not an official Obsidian or PDF++ product. PDF++ is referenced for compatibility; this repository does not bundle PDF++ source. Obsidian supplies the runtime plugin API. Build and test dependencies are listed in package.json; they are not bundled into the runtime plugin.