TranslationPlugin Get started Updates Support and donations GitHub

Features

  • Multiple Translation Engines
    • Google Translate
    • Youdao Translate
    • Baidu Translate
    • Alibaba Translate
  • Multilingual translation
  • Document translation
  • Text-to-speech
  • Automatic word selection
  • Automatic word breaks
  • Word Book
Supported JetBrains IDE products:
  • Android Studio
  • AppCode
  • CLion
  • DataGrip
  • GoLand
  • HUAWEI DevEco Studio
  • IntelliJ IDEA Ultimate
  • IntelliJ IDEA Community
  • IntelliJ IDEA Educational
  • MPS
  • PhpStorm
  • PyCharm Professional
  • PyCharm Community
  • PyCharm Educational
  • Rider
  • RubyMine
  • WebStorm

Installation

Installing from the plugin repository within the IDE:

  • Preferences (Settings) > Plugin > Marketplace > Search and find "Translation" > Install Plugin.

Installing manually:

  • Download the latest plugin package on GitHub or in the JetBrains Plugin Repository
  • Preferences (Settings) > Plugins > ⚙ > Install plugins 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)

Note: Please protect your application key to prevent any security breaches. If your account has any outstanding debts, you will not be able to use it for these services.

2. Begin translating

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

Or use shortcuts for translation, as detailed in 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 > Separator) and in the original format.

Instructions: Select text or hover the mouse over the text > Right-click > Translate and replace... (Or use shortcuts for translation, as detailed in 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 translation engines

Click the translation engine icon in the status bar or use the shortcut Ctrl + Shift + S (Mac OS: Control + Meta + Y) to quickly switch between translation engines. Currently, Google Translate, Youdao Translate, Baidu Translate and Alibaba Translate are supported.

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
  • Translation

    Extract words and translate them. If you have already selected a text, extract the words from the portion of the text you'd like 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
    • macOS - Control + Meta + U
  • Translation (inclusive)

    Extract words and translate them. Automatically extract and translate all words from a specific range, ignoring manually selected text. Default shortcut: (None)

  • Translation (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 between Quick Documentation translations

    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
    • macOS - Control + Meta + U
  • Translate the 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:

    • Windows - Ctrl + Shift + Y
    • macOS - Control + Meta + U
  • Select a translator

    Quickly toggle between translation engines. Default shortcut:

    • Windows - Ctrl + Shift + S
    • macOS - 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

  • 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 are 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 (Settings > Appearance & Behavior > System Settings > Passwords). For more details:

    • For macOS,please refer to #81
    • For Linux,please refer to #115
  • 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.

  • How and where can I give feedback on an issue?

    A: If you find any problems with the plugin, or have any comments or suggestions about the plugin, you can click here to give feedback. Please read the Issue Management Announcements before giving feedback on an issue. If you have any questions, you can also ask here.