Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/YiiGuxing/TranslationPlugin

Translation plugin for IntelliJ based IDEs/Android Studio.
https://github.com/YiiGuxing/TranslationPlugin

android-studio deveco-studio intellij intellij-plugin jetbrains-ides plugin translate translate-plugin translation

Last synced: 3 months ago
JSON representation

Translation plugin for IntelliJ based IDEs/Android Studio.

Awesome Lists containing this project

README

        

# [![TranslationPlugin][plugin-logo]][gh:translation-plugin] TranslationPlugin

[![Plugin Homepage][badge:plugin-homepage]][plugin-homepage]
[![Build Status][badge:build]][gh:workflows-build]
[![License][badge:license]][gh:license]
[![GitHub releases][badge:release]][gh:releases]
[![Version][badge:version]][plugin-versions]
[![Downloads][badge:downloads]][plugin-homepage]
[![Financial Contributors on Open Collective][badge:open-collective]][open-collective]

Translation plugin for IntelliJ based IDEs/Android Studio.


screenshots




[![Getting Started][badge:get-started-en]][get-started-en]
[![开始使用][badge:get-started-zh]][get-started-zh]
[![はじめに][badge:get-started-jp]][get-started-ja]
[![시작하기][badge:get-started-ko]][get-started-ko]

---

[![Microsoft Translator][logo:microsoft-translator]](https://www.bing.com/translator)
    
[![Google Translate][logo:google-translate]](https://translate.google.com)
    
[![OpenAI Translator][logo:openai]](https://openai.com/)
    
[![DeepL Translator][logo:deepl-translator]](https://www.deepl.com)
    
[![Youdao Translate][logo:youdao-translate]](https://ai.youdao.com)
    
[![Baidu Translate][logo:baidu-translate]](https://fanyi-api.baidu.com)
    
[![Alibaba Translate][logo:ali-translate]](https://translate.alibaba.com)

---

- [Features](#features)
- [Compatibility](#compatibility)
- [Installation](#installation)
- [Using the Plugin](#using-the-plugin)
- [Actions](#actions)
- [FAQ](#faq)
- [Support and Donations](#support-and-donations)
- [Contributors](#contributors)
- [Code Contributors](#code-contributors)
- [Financial Contributors](#financial-contributors)

## 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


Get from Marketplace

- **Installing from the plugin repository within the IDE:**
- Preferences(Settings) > Plugins > Marketplace > Search and find "
Translation"
> Install Plugin.

- **Installing manually:**
- Download the plugin package on [GitHub Releases][gh:releases] or in
the [JetBrains Plugin Repository][plugin-versions].
- Preferences(Settings) > Plugins > ⚙️ > Install plugin from disk... >
Select the plugin package and install (no need to unzip)

Restart the **IDE** after installation.

## Using The Plugin

1. **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:Preferences(Settings) >
Tools
>
Translation
> General > Translation Engine > Configure...

2. **Begin translating**

Select a text or hover the mouse over the text > Right-click > Translate

Or use shortcuts for translation, as detailed in **[Actions](#actions)**.

3. **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: Translation Settings > Translate and replace > Separator)
and in the **original format**.

Instructions: Select a text or hover the mouse over the text > Right-click > Translate and
Replace...
(Or use shortcuts for translation, as detailed in **[Actions](#actions)**).

4. **Translate documents**

Preferences(Settings) > Tools > Translation > Other > Translate
documents
: When you check this option, the document will be automatically translated when you view it.

5. **Switch engines**

Click the engine widget in the status bar or use the shortcut Ctrl + Shift + S
(Mac OS: Control + Meta + Y) 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 - Ctrl + Shift + O
- Mac OS - Control + Meta + I

- **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 - Ctrl + Shift + Y
- Mac OS - Control + Meta + U

- **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 - Ctrl + Shift + X
- Mac OS - Control + Meta + O

- **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 - Ctrl + Shift + Y
- Mac OS - Control + Meta + U

- **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 - Ctrl + Shift + Y
- Mac OS - Control + Meta + U

- **Switch Engine**

Quickly switch between translation engine and TTS engine. Default shortcut:

- Windows - Ctrl + Shift + S
- Mac OS - Control + Meta + Y

- **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 - Alt + S
- Display the list of target languages - Alt + T
- Switch between languages - Alt + Shift + S
- Pin/unpin a window - Alt + P
- Play TTS - Alt/Meta/Shift + Enter
- Save to Word Book - Ctrl/Meta + F
- Show history - Ctrl/Meta + H
- Copy translation - Ctrl/Meta + Shift + C
- Clear input - Ctrl/Meta + Shift + BackSpace/Delete
- Expand more translations - Ctrl/Meta + Down
- Hide more translations - Ctrl/Meta + UP

- Translation balloon shortcuts:

- Open dialog - Ctrl + Shift + Y / Control + Meta +
U

- Quick Documentation window shortcuts:

- Enable/disable automatic translation - Ctrl + Shift + Y / Control
+ Meta + U

## FAQ

> *If you have any questions, please ask [here][gh:discussions-q-a].*

1. **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.

2. **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).

![screenshots][file:settings-font]

3. **What if I can't save the application key?**

**A:** You can try changing the way passwords are saved to `In KeePass` (Settings > Appearance &
Behavior
> System Settings > Passwords). For more details:
- For macOS, please refer to [#81][gh:#81]
- For Linux, please refer to [#115][gh:#115]

4. **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:




Open Collective
WeChat Pay
Alipay





Donate To Our Collective




WeChat Play




Alipay



> **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 [][: message]` (website and message are optional.)
>
> Example: `Yii.Guxing : I like the plugin!`
>
> If you choose to send an email, please also provide the following information:
> ```text
> Donation Amount:
> Payment Platform: Alipay/WeChat Pay
> Payment Number (last 5 digits):
> ```
> Email address: [[email protected]][mailto] (click to send email)
>
> The name, website and total donation amount you provide will be added to
> the [donor list][file:financial-contributors].

**Thank you for your support!**

## Contributors

### Code Contributors

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].

### Financial Contributors

Become a financial contributor and help us sustain our
community. [[Contribute][open-collective-contribute]]

#### Backers

Thank you to all our backers! ❤️ [[Become a backer](https://opencollective.com/translation-plugin/donate)]

#### Sponsors

Support this project by becoming a sponsor! Your logo will show up here with a link to your
website. [[Become a sponsor][open-collective-contribute]]










#### Donors

| **Name** | **Website** | **Amount** |
|------------|--------------------------------------------------------|------------|
| 丿初音 | | 425.00 CNY |
| 剑平 | | 120.00 CNY |
| 山有扶苏 | [github.com/fobgochod](https://github.com/fobgochod) | 110.00 CNY |
| 丁云波 | | 100.00 CNY |
| 逆行 | | 100.00 CNY |
| Kimmy | | 100.00 CNY |
| LiMingjun | | 100.00 CNY |
| DarknessTM | [github.com/darknesstm](https://github.com/darknesstm) | 100.00 CNY |
| Sunlife95 | | 100.00 CNY |
| 马强@咔丘互娱 | | 100.00 CNY |

[More donors][file:financial-contributors]

[plugin-logo]: https://yiiguxing.github.io/TranslationPlugin/img/ext/plugin-icon.svg

[badge:plugin-homepage]: https://img.shields.io/badge/plugin%20homepage-translation-4caf50.svg?style=flat-square
[badge:build]: https://img.shields.io/endpoint?label=build&style=flat-square&url=https%3A%2F%2Factions-badge.atrox.dev%2FYiiGuxing%2FTranslationPlugin%2Fbadge%3Fref%3Dmaster
[badge:license]: https://img.shields.io/github/license/YiiGuxing/TranslationPlugin.svg?style=flat-square
[badge:release]: https://img.shields.io/github/release/YiiGuxing/TranslationPlugin.svg?sort=semver&style=flat-square&colorB=0097A7
[badge:version]: https://img.shields.io/jetbrains/plugin/v/8579.svg?style=flat-square&colorB=2196F3
[badge:downloads]: https://img.shields.io/jetbrains/plugin/d/8579.svg?style=flat-square&colorB=5C6BC0
[badge:open-collective]: https://opencollective.com/translation-plugin/all/badge.svg?label=financial+contributors&style=flat-square&color=d05ce3
[badge:get-started-en]: https://img.shields.io/badge/Get%20Started-English-4CAF50?style=flat-square
[badge:get-started-zh]: https://img.shields.io/badge/%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8-%E4%B8%AD%E6%96%87-2196F3?style=flat-square
[badge:get-started-jp]: https://img.shields.io/badge/%E3%81%AF%E3%81%98%E3%82%81%E3%81%AB-%E6%97%A5%E6%9C%AC%E8%AA%9E-009688?style=flat-square
[badge:get-started-ko]: https://img.shields.io/badge/%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0-%ED%95%9C%EA%B5%AD%EC%96%B4-7CB342?style=flat-square

[gh:translation-plugin]: https://github.com/YiiGuxing/TranslationPlugin
[gh:releases]: https://github.com/YiiGuxing/TranslationPlugin/releases
[gh:workflows-build]: https://github.com/YiiGuxing/TranslationPlugin/actions/workflows/build.yml
[gh:license]: https://github.com/YiiGuxing/TranslationPlugin/blob/master/LICENSE
[gh:discussions-q-a]: https://github.com/YiiGuxing/TranslationPlugin/discussions/categories/q-a
[gh:#81]: https://github.com/YiiGuxing/TranslationPlugin/issues/81
[gh:#115]: https://github.com/YiiGuxing/TranslationPlugin/issues/115

[logo:ali-translate]: https://yiiguxing.github.io/TranslationPlugin/img/ext/ali_translate_logo.png
[logo:baidu-translate]: https://yiiguxing.github.io/TranslationPlugin/img/ext/baidu_translate_logo.svg
[logo:deepl-translator]: https://yiiguxing.github.io/TranslationPlugin/img/ext/deepl_translate_logo.svg
[logo:google-translate]: https://yiiguxing.github.io/TranslationPlugin/img/ext/google_translate_logo.svg
[logo:microsoft-translator]: https://yiiguxing.github.io/TranslationPlugin/img/ext/microsoft_translator_logo.svg
[logo:openai]: https://yiiguxing.github.io/TranslationPlugin/img/ext/openai_logo.svg
[logo:youdao-translate]: https://yiiguxing.github.io/TranslationPlugin/img/ext/youdao_translate_logo.svg

[file:settings-font]: .github/readme/settings_font.png
[file:financial-contributors]: https://github.com/YiiGuxing/TranslationPlugin/blob/master/FINANCIAL_CONTRIBUTORS.md

[get-started-en]: https://intellij-translation.yiiguxing.top/#/en/docs
[get-started-zh]: https://intellij-translation.yiiguxing.top/#/docs
[get-started-ja]: https://intellij-translation.yiiguxing.top/#/ja/docs
[get-started-ko]: https://intellij-translation.yiiguxing.top/#/ko/docs

[plugin-homepage]: https://plugins.jetbrains.com/plugin/8579-translation
[plugin-versions]: https://plugins.jetbrains.com/plugin/8579-translation/versions

[open-collective]: https://opencollective.com/translation-plugin
[open-collective-contribute]: https://opencollective.com/translation-plugin/contribute

[mailto]: mailto:[email protected]?subject=Donate&body=Name%2FNickname%3Cwebsite%3E%3A%20%3Cmessage%3E%0D%0DDonation%20Amount%3A%20%3Camount%3E%0DPayment%20Platform%3A%20Alipay%2FWeChat%20Pay%0DPayment%20Number%20%28last%205%20digits%29%3A%20%3Cnumber%3E%0D%0D