A powerful Logseq plugin that translates block content using the DeepL API. Supports 30+ languages with automatic source language detection.
- π Multi-language support - Translate to/from 30+ languages
- π Two translation modes:
- Show Translation - Display translated text in a dialog
- Replace with Translation - Inline replace block content with translated text
- β‘ Fast performance - Lightweight bundled plugin
- π― Block-level translation - Right-click any block to translate
- π Auto-language detection - Automatically detects source language
-
Get DeepL API Key
- Sign up for free at DeepL API
- Copy your API key
-
Load Plugin in Logseq
- Open Logseq
- Go to Plugins β Marketplace
- Search DeepL Translator
- Click "Install"
-
Configure API Key
- Click the plugin settings icon (βοΈ)
- Paste your DeepL API key
- (Optional) Set default target language (default: EN)
- (Optional) Enable Pro API if you have a Pro account (untested)
- Right-click any block in Logseq
- Click "π Translate"
- Translation appears in a dialog
- Click outside dialog to close
- Right-click any block in Logseq
- Click "π Replace with Translation"
- Block content is replaced with the translated text
The plugin supports all DeepL languages.
Open plugin settings to customize:
| Setting | Type | Default | Description |
|---|---|---|---|
| API Key | String | - | Your DeepL API key (required) |
| Default Target Language | String | EN | Target language for translations |
| Use Pro API | Boolean | false | Enable for DeepL Pro accounts |
- Block Context Menu - Plugin registers two menu items on every block
- Content Retrieval - Fetches block content via Logseq Editor API
- API Call - Sends text to DeepL API with authentication
- Display/Replace - Shows result in dialog or replaces block inline
- Auto-detect - DeepL automatically detects source language
- Free Tier: Uses
https://api-free.deepl.com/v2/translate - Pro Tier: Uses
https://api.deepl.com/v2/translate - Rate Limits: Depends on your DeepL plan
- Authentication: Bearer token via
Authorizationheader
- β Solution: Add your API key in plugin settings
- β Solution: Check your API key is valid and not expired
- β Solution: Ensure the block has text content
- β Verify Pro/Free API setting matches your DeepL account
"Translation failed: DeepL API error 400: Bad request. Reason: Value for 'target_lang' not supported."
- β Use only legal language code like 'DE'
- β Your API plan has reached its limitations. Wait until the next billing period, or update to pro.
logseq-plugin-deepl-translate/
βββ .github/
β βββ workflows/
β βββ release.yml # Semantic-release CI/CD pipeline
βββ src/
β βββ main.ts # Main plugin entry point
β βββ api/
β β βββ deepl.ts # DeepL API client
β βββ types/
β β βββ index.ts # TypeScript interfaces
β βββ ui/
β βββ dialog.ts # Translation dialog UI
βββ .eslintignore # Git ignore rules
βββ index.html # Plugin HTML entry point
βββ manifest.json # Logseq marketplace manifest
βββ package.json # Dependencies & metadata
βββ package-lock.json # Locked dependency versions
βββ release.config.js # Semantic-release configuration
βββ tsconfig.json # TypeScript compiler config
βββ logo.png # Plugin icon
βββ README.md # This file
βββ CHANGELOG.md # Auto-generated release notes
- Node.js: 24 LTS or later
- npm: 10.x or later
# Install dependencies
npm install
# Build the plugin
npm run build
# Run semantic-release (creates releases and tags)
npm run releasenpm run build- Compile TypeScript and bundle for browsernpm run release- Create a semantic-release (requires conventional commits and git push tomain)
@logseq/libs- Logseq plugin SDKesbuild- Bundler (dev)typescript- Language (dev)
MIT
- GitHub Copilot / Auto-Model 12/2025
- Nillorian
For issues or feature requests, please create an issue in the repository.
Note: This plugin requires internet connection to communicate with DeepL API. Your text is sent to DeepL servers for translation.
- Automatic releases: This repository is configured to use
semantic-releaseto derive versions and changelogs from conventional commit messages and to create GitHub releases. - Workflow: A GitHub Actions workflow runs on pushes to
main(and viaworkflow_dispatch) and will runnpm ci,npm run build, and thennpx semantic-release. - Token: The workflow uses the built-in
GITHUB_TOKENsecret to create release artifacts β no extra token is required for basic releases. If you want to publish to npm or other services, add the appropriate secrets and adjustrelease.config.js.