Connect with us

Code

TranslationPlugin – Translation plugin for IntelliJ based IDEs/Android Studio

Translation plugin for IntelliJ based IDEs/Android Studio.

TranslationPlugin Features

  • Multiple Translation Engines
    • Microsoft Translator
    • Google Translate
    • DeepL Translator
    • OpenAI Translator
    • Youdao Translate
    • Baidu Translate
    • Alibaba Translate
  • Multilingual translation
  • Document translation
  • Text-to-speech
  • Automatic word selection
  • Automatic word breaks
  • Word Book

Compatibility

  • 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

Using The TranslationPlugin

  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.

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

  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 switch between translation engines quickly.

TranslationPlugin 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
  • Choose Translation Engine

    Quickly toggle between translation engines. 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
TranslationPlugin on GitHub: https://github.com/YiiGuxing/TranslationPlugin
Platform: Android
⭐️: 10.1K
Advertisement

Trending