About
Translate PDF, EPub, webpage, metadata, annotations, notes to the target language. Support 20+ translate services.
# Translate for Zotero
_Translate for Zotero_, a.k.a. _Zotero PDF Translate_, is a [Zotero](https://www.zotero.org/) plugin.
Translate PDF, EPub, webpage, metadata, annotations, notes to the target language. Support 20+ translate services.
[中文文档](https://zotero.yuque.com/books/share/4443494c-c698-4e08-9d1e-ed253390346d)
# Quick Start Guide
## Install
- Download the plugin (.xpi file) from below.
- [Latest Stable](https://github.com/windingwind/zotero-pdf-translate/releases/latest)
- [All Releases](https://github.com/windingwind/zotero-pdf-translate/releases)
_Note_ If you're using Firefox as your browser, right-click the `.xpi` and select "Save As.."
- In Zotero click `Tools` in the top menu bar and then click `Plugins`
- Go to the Extensions page and then click the gear icon in the top right.
- Select `Install Plugin from file`.
- Browse to where you downloaded the `.xpi` file and select it.
- Finish!
## Usage
Open any PDF/EPub/webpage in the Zotero reader.
- Select text, the translations are shown on the pop-up and the item pane(v0.2.0).
- Highlight/Underline some text, the translations are added to the annotation comment(v0.3.0); Modify & retranslate the annotation text in the item pane and click the `Update Annotation` to modify the annotation text and translation(v0.6.6);
- Add selected text along with translation to note(v0.4.0); _Only works when a note editor is active._
- Translate item titles with right-click menu or shortcut `Ctrl+T`(v0.6.0).
- Translate item abstract with right-click menu(v0.8.0). Thanks @iShareStuff
- Standalone translation window available(v0.7.0). View & compare translations from multiply services in one window!
- Dictionary for single word translation(v0.7.1).
- SentenceBySentence Translation(v1.1.0). After a translation, press `shift`+`P` and select `Translate Sentences`. _Only for en2zh and en2en now_. Thanks @MuiseDestiny
- Since v2.2.0, the concat mode shortcut is ctrl (on Windows/Linux) or ⌘ (on macOS).
### Q&A
**Q** I want to translate manually.
**A** Go to `Edit->Settings->Translate->General`, uncheck the `Automatically Translate Selection`. Click the `Translate` button on the pop-up or item pane to translate.
**Q** I want a translate shortcut.
**A**
Press shortcut `Ctrl+T` after you selected some text. If you are in the collection view, the titles' translation will show/hide.
**Q** I want to concat different selections and translate them together.
**A** Press `Ctrl/⌘` or select the `Concat Mode` check box on item pane when selecting text in PDF/EPub/webpage.
**Q** Not the language I want.
**A** The default target language is the same as your Zotero language. Go to `Edit->Settings->Translate->Service` and change the language settings.
**Q** Translation not correct or report an error.
**A** See _Language Settings_ above and FAQ([#6](https://github.com/windingwind/zotero-pdf-translate/issues/6)). Make sure you use the right secret.
**Q** I want to change the font size.
**A** Go to `Edit->Settings->Translate->User Interface` and set the font size.
**Q** I want to resize the raw and result text area in the translate panel.
**A** Drag the separator up and down to adjust the size. Double-click the separator to reset the size.
## Settings
### General
- Automatically Translate Selection, default `true`
- Automatically Translate Annotation: Save annotation's translation to annotation comment or annotation body, default `false`
- Automatically Translate Annotation from Sync: Automatically translate annotations synced from other devices if `true`, default `false`
- Enable Reader Selection Pop-up: Show results in the pop-up panel or only in the item pane, default `true`
- Show "Add Translation to Note" in Pop-up: default `true`
> Invisible if no active note editor opened.
- Replace Raw: Use translation to replace the raw text when adding to note, default `false`
- Enable Dictionary: Single word will be translated using dictionary service instead of translate service, default `true`
- Show Play Buttons: Show the word pronunciation play buttons if available, default `true`
- Auto-play Pronunciation, default `false`
### Service
The default service is Google Translate. Currently, we support:
| Translate Service | Require Secret | Supported Languages |
| ---------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Google Translate | No **[Free]** | [100+](https://translate.google.com/about/languages/) |
| Google Translate(API) | No **[Free]** | Use `translate.googleapis.com` |
| CNKI | No **[Free]** | |
| Haici Translate | No **[Free]** | |
| Youdao Translate | No **[Free]** | [100+?](https://ai.youdao.com/DOCSIRMA/html/trans/api/wbfy/index.html) |
| iCIBA Translate | No **[Free]** | |
| MyMemory | No **[Free 5k/day per IP]** |
(Free upgrade: enter your email in Settings to get 50k/day per IP quota) |
| Bing | No **[Free]** | [en-zh](https://learn.microsoft.com/en-us/azure/ai-services/translator/text-translation/reference/v3/reference) |
| DeepLX | No **[Free]** | Based on [DeepLX](https://github.com/OwO-Network/DeepLX?tab=readme-ov-file) |
| DeepLX(API) | No **[Require config]** | [DeepLX](https://github.com/OwO-Network/DeepLX?tab=readme-ov-file) related projects |
| LibreTranslate | Optional **[Require config]** | [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate) |
| MTranServer | Optional **[Require config]** | [MTranServer](https://github.com/xxnuo/MTranServer) |
| NLLB | No **[Require config]** | [nllb-api](https://github.com/winstxnhdw/nllb-api?tab=readme-ov-file#self-hosting) or [NLLB Serve](https://github.com/thammegowda/nllb-serve?tab=readme-ov-file#setup) |
| Pot | No **[Require config]** | [Pot](https://github.com/pot-app/pot-desktop) _Translate results show in Pot_ |
| Huoshan | Yes | [50+](https://www.volcengine.com/docs/4640/127681) |
| Volcengine Web | No **[Free]** | [en, zh, and more (auto-detect, web version)](https://translate.volcengine.com/) |
| Youdao Zhiyun | Yes | [100+](https://ai.youdao.com/DOCSIRMA/html/trans/api/wbfy/index.html) |
| Youdao LLM | Yes | [LLM-based](https://ai.youdao.com/DOCSIRMA/html/trans/api/dmxfy/index.html)(en-zh) |
| Niu Trans | Yes | [400+](https://niutrans.com/documents/contents/trans_text#accessMode) |
| Microsoft Translate | Yes(free 2M) | [200+](https://docs.microsoft.com/en-us/azure/cognitive-services/translator/language-support) |
| LingoCloud(Caiyun) Translate | Yes | [10+](https://docs.caiyunapp.com/lingocloud-api/index.html) |
| DeepL Translate | Yes(free 500k) | [100+](https://www.deepl.com/pro?cta=header-prices/#developer) |
| Aliyun Translate | Yes(free-1M) | [200+](https://help.aliyun.com/document_detail/158269.html) |
| Baidu Translate | Yes(free-QPS1/free-2M) | [200+](https://fanyi-api.baidu.com/product/11) |
| Baidu Field | Yes(free-QPS1/free-2M) | [en-zh](https://fanyi-api.baidu.com/product/12) |
| OpenL | Yes | [11](https://docs.openl.club/#/API/format) |
| Tencent Translate | Yes(QPS5, free-5M) | [15](https://cloud.tencent.com/document/product/551/7372) |
| Tencent Transmart | No **[Free]** | [en, zh, and more (auto-detect, web version)](https://transmart.qq.com/) |
| Xftrans | Yes(free 2M) | [Xftrans API](https://www.xfyun.cn/doc/nlp/xftrans/API.h