Awesome
TranslationPlugin
<p align="center"><b>Translation plugin for IntelliJ based IDEs/Android Studio.</b></p>
<p align="center"><img src="https://yiiguxing.github.io/TranslationPlugin/img/ext/screenshots.gif" alt="screenshots"></p>
<br/><br/><br/>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
Features
- Multiple Translation Engines
- Microsoft Translator
- Google Translate
- DeepL Translator
- OpenAI Translator
- Youdao Translate
- Baidu Translate
- Alibaba Translate
- Multiple languages inter-translation
- Text-to-speech
- Microsoft Edge TTS
- Google TTS
- OpenAI TTS
- Document translation
- Automatic word selection
- Automatic word breaks
- Word Book
Compatibility
- Android Studio
- Aqua
- AppCode
- CLion
- DataGrip
- DataSpell
- GoLand
- HUAWEI DevEco Studio
- IntelliJ IDEA Community
- IntelliJ IDEA Ultimate
- MPS
- PhpStorm
- PyCharm Community
- PyCharm Professional
- Rider
- RubyMine
- RustRover
- WebStorm
Installation
<a href="https://plugins.jetbrains.com/plugin/8579-translation" target="_blank"> <img src="https://yiiguxing.github.io/TranslationPlugin/img/ext/installation_button.svg" height="52" alt="Get from Marketplace" title="Get from Marketplace"> </a>-
Installing from the plugin repository within the IDE:
- <kbd>Preferences(Settings)</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search and find <b>" Translation"</b></kbd> > <kbd>Install Plugin</kbd>.
-
Installing manually:
- Download the plugin package on GitHub Releases or in the JetBrains Plugin Repository.
- <kbd>Preferences(Settings)</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd> > Select the plugin package and install (no need to unzip)
Restart the IDE after installation.
Using The Plugin
-
Sign up for a translation service (optional)
Most translation services require user registration to access their services (such as OpenAI, DeepL, Youdao Translate, etc.). Therefore, you may need to create an account, obtain an Authentication Key, and then bind the Authentication Key within the plugin:<kbd>Preferences(Settings)</kbd> > <kbd> Tools</kbd> > <kbd> Translation</kbd> > <kbd>General</kbd> > <kbd>Translation Engine</kbd> > <kbd>Configure...</kbd>
-
Begin translating
<kbd>Select a text or hover the mouse over the text</kbd> > <kbd>Right-click</kbd> > <kbd>Translate</kbd>
Or use shortcuts for translation, as detailed in Actions.
-
Translate and replace
Translate the target text and replace it. If the target language is English, the output has several formats: in camel case, with a word separator (when the output contains multiple words, the separator can be configured in the plugin configuration page: <kbd>Translation Settings</kbd> > <kbd>Translate and replace</kbd> > <kbd>Separator</kbd>) and in the original format.
Instructions: <kbd>Select a text or hover the mouse over the text</kbd> > <kbd>Right-click</kbd> > <kbd>Translate and Replace...</kbd> (Or use shortcuts for translation, as detailed in Actions).
-
Translate documents
<kbd>Preferences(Settings)</kbd> > <kbd>Tools</kbd> > <kbd>Translation</kbd> > <kbd>Other</kbd> > <kbd>Translate documents</kbd>: When you check this option, the document will be automatically translated when you view it.
-
Switch engines
Click the engine widget in the status bar or use the shortcut <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd> (Mac OS: <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>Y</kbd>) to switch between the translation engine and the TTS engine quickly.
Actions
-
Show Translation Dialog...
Open the translation dialog, which appears by default on the toolbar. Default shortcut:
- Windows - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd>
- Mac OS - <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>I</kbd>
-
Translate
Extract words and translate them. If you have already selected a text, extract the words from the portion of the text you'd like to translate. Otherwise, words are extracted automatically from the maximum range (this extraction can be configured in Settings). This action is displayed by default in the editor's right-click context menu. Default shortcut:
- Windows - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Y</kbd>
- Mac OS - <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>U</kbd>
-
Translate(Inclusive)
Extract words and translate them. Automatically extract and translate all words from a specific range, ignoring manually selected text. Default shortcut: (None)
-
Translate(Exclusive)
Extract words and translate them. Automatically extract the nearest single word, ignoring manually selected text. Default shortcut: (None)
-
Translate and Replace...
Translate and replace. The word extraction method works the same as when translating. Default shortcut:
- Windows - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>X</kbd>
- Mac OS - <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>O</kbd>
-
Translate Documentation
Translate the contents of document comments. This option is displayed by default in the editor's context menu (right-click to access) and is available when the cursor is in the document's comment block. Default shortcut: (None)
-
Toggle Quick Documentation Translation
Toggle between the original and translated texts in Quick Documentation. This option is available when the focus is on the Quick Documentation pop-up window or the documentation tool window. Default shortcut (same as translation shortcut):
- Windows - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Y</kbd>
- Mac OS - <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>U</kbd>
-
Translate Text Component
Translate selected text in some text components (e.g. Quick Docs, popup hints, input boxes...). This does not support automatic word extraction. Default shortcut (same as translation shortcut):
- Windows - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Y</kbd>
- Mac OS - <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>U</kbd>
-
Switch Engine
Quickly switch between translation engine and TTS engine. Default shortcut:
- Windows - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd>
- Mac OS - <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd>Y</kbd>
-
Word of the Day
Display the 'Word of the Day' dialog box. Default shortcut: (None)
-
Other
-
Translation dialog shortcuts:
- Display the list of source languages - <kbd>Alt</kbd> + <kbd>S</kbd>
- Display the list of target languages - <kbd>Alt</kbd> + <kbd>T</kbd>
- Switch between languages - <kbd>Alt</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd>
- Pin/unpin a window - <kbd>Alt</kbd> + <kbd>P</kbd>
- Play TTS - <kbd>Alt/Meta/Shift</kbd> + <kbd>Enter</kbd>
- Save to Word Book - <kbd>Ctrl/Meta</kbd> + <kbd>F</kbd>
- Show history - <kbd>Ctrl/Meta</kbd> + <kbd>H</kbd>
- Copy translation - <kbd>Ctrl/Meta</kbd> + <kbd>Shift</kbd> + <kbd>C</kbd>
- Clear input - <kbd>Ctrl/Meta</kbd> + <kbd>Shift</kbd> + <kbd>BackSpace/Delete</kbd>
- Expand more translations - <kbd>Ctrl/Meta</kbd> + <kbd>Down</kbd>
- Hide more translations - <kbd>Ctrl/Meta</kbd> + <kbd>UP</kbd>
-
Translation balloon shortcuts:
- Open dialog - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Y</kbd> / <kbd>Control</kbd> + <kbd>Meta</kbd> + <kbd> U</kbd>
-
Quick Documentation window shortcuts:
- Enable/disable automatic translation - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Y</kbd> / <kbd>Control</kbd>
- <kbd>Meta</kbd> + <kbd>U</kbd>
- Enable/disable automatic translation - <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Y</kbd> / <kbd>Control</kbd>
-
FAQ
If you have any questions, please ask here.
-
What should I do if there is a network error or the network connection times out?
A:
- Check the network environment and make sure the network is running smoothly.
- Check whether a proxy is preventing the plugin from accessing the translation API.
- Check the IDE proxy configuration to see if that is the cause of the problem.
-
What should I do if the translated content appears garbled?
A: Garbled code generally appears when there is a lack of corresponding characters in the font. You can go to the Settings page of the plugin to modify the font in order to fix the garbled code (as shown below).
-
What if I can't save the application key?
A: You can try changing the way passwords are saved to
In KeePass
(<kbd>Settings</kbd> > <kbd>Appearance & Behavior</kbd> > <kbd>System Settings</kbd> > <kbd>Passwords</kbd>). For more details: -
What if the shortcuts don't work?
A: The shortcut keys are most likely not working because they are being used in other plugins or external applications. You can reset shortcut keys for the corresponding operations.
Support and Donations
You can contribute and support this project by doing any of the following:
-
Star the project on GitHub
-
Give feedback
-
Commit PR
-
Contribute your ideas/suggestions
-
Share the plugin with your friends/colleagues
-
If you love this plugin, please consider donating. It will inspire me to continue development on the project:
<table> <thead align="center"> <tr> <th><a href="https://opencollective.com/translation-plugin" target="_blank">Open Collective</a></th> <th><a href="https://pay.weixin.qq.com/index.php/public/wechatpay_en" target="_blank">WeChat Pay</a></th> <th><a href="https://global.alipay.com" target="_blank">Alipay</a></th> </tr> </thead> <tr align="center"> <td> <a href="https://opencollective.com/translation-plugin/donate" target="_blank"> <img src="https://yiiguxing.github.io/TranslationPlugin/img/ext/donate_to_collective.svg" width=298 alt="Donate To Our Collective"> </a> </td> <td> <a href="https://pay.weixin.qq.com/index.php/public/wechatpay_en" target="_blank"> <img src="https://yiiguxing.github.io/TranslationPlugin/img/donating_wechat_pay.svg" alt="WeChat Play"> </a> </td> <td> <a href="https://global.alipay.com" target="_blank"> <img src="https://yiiguxing.github.io/TranslationPlugin/img/donating_alipay.svg" alt="Alipay"> </a> </td> </tr> </table>Note
After using Alipay/WeChat to pay for your donation, please provide your name/nickname and website by leaving a message or via email in the following format:
Name/Nickname [<website>][: message]
(website and message are optional.)Example:
Yii.Guxing <github.com/YiiGuxing>: I like the plugin!
If you choose to send an email, please also provide the following information:
Donation Amount: <amount> Payment Platform: Alipay/WeChat Pay Payment Number (last 5 digits): <number>
Email address: yii.guxing@outlook.com (click to send email)
The name, website and total donation amount you provide will be added to the donor list.
Thank you for your support!
Contributors
Code Contributors
This project exists thanks to all the people who contribute. [Contribute]. <a href="https://github.com/YiiGuxing/TranslationPlugin/graphs/contributors"><img src="https://opencollective.com/translation-plugin/contributors.svg?width=890&button=false" /></a>
Financial Contributors
Become a financial contributor and help us sustain our community. [Contribute]
Backers
Thank you to all our backers! ❤️ [Become a backer]
<a href="https://opencollective.com/translation-plugin/donate" target="_blank"><img src="https://opencollective.com/translation-plugin/individuals.svg?width=800"></a>
Sponsors
Support this project by becoming a sponsor! Your logo will show up here with a link to your website. [Become a sponsor]
<a href="https://opencollective.com/translation-plugin/organization/0/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/0/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/1/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/1/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/2/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/2/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/3/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/3/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/4/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/4/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/5/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/5/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/6/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/6/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/7/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/7/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/8/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/8/avatar.svg?avatarHeight=128"></a> <a href="https://opencollective.com/translation-plugin/organization/9/website" target="_blank"><img src="https://opencollective.com/translation-plugin/organization/9/avatar.svg?avatarHeight=128"></a>
Donors
Name | Website | Amount |
---|---|---|
丿初音 | 425.00 CNY | |
剑平 | 120.00 CNY | |
山有扶苏 | github.com/fobgochod | 110.00 CNY |
逆行 | 100.00 CNY | |
Kimmy | 100.00 CNY | |
LiMingjun | 100.00 CNY | |
DarknessTM | github.com/darknesstm | 100.00 CNY |
Sunlife95 | 100.00 CNY | |
马强@咔丘互娱 | 100.00 CNY | |
Rrtt_2323 | 100.00 CNY |