explaingit

yiiguxing/translationplugin

11,784KotlinAudience · developerComplexity · 1/5Setup · easy

TLDR

TranslationPlugin adds instant translation to JetBrains IDEs like IntelliJ IDEA and Android Studio, letting developers translate code comments, documentation, and variable names without leaving the editor.

Mindmap

mindmap
  root((translationplugin))
    What It Does
      In-editor translation
      Text-to-speech
      Variable rename helper
    Translation Services
      Microsoft Translator
      Google Translate
      DeepL
      OpenAI
    Key Features
      Popup translation
      Doc auto-translate
      Word Book
    Supported IDEs
      IntelliJ IDEA
      Android Studio
      PyCharm
      WebStorm
    Audience
      Non-English developers
      Language learners
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Translate API documentation that appears in Quick Documentation panels without switching to a browser tab.

USE CASE 2

Rename a variable by selecting it, translating it to English, and replacing it in camel case to match code naming conventions.

USE CASE 3

Read library comments written in Chinese or Japanese in real time while coding in IntelliJ IDEA.

USE CASE 4

Save useful translations to the Word Book feature for later review when studying an unfamiliar API.

Tech stack

KotlinJetBrains SDK

Getting it running

Difficulty · easy Time to first run · 5min

Most translation services require a free API key from the provider, Microsoft Translator and Google Translate work without one for basic use.

In plain English

TranslationPlugin is a translation plugin for JetBrains IDEs, including IntelliJ IDEA, Android Studio, PyCharm, WebStorm, GoLand, CLion, Rider, and about a dozen others. It lets developers translate text without leaving the editor, using keyboard shortcuts or the right-click context menu. The plugin connects to multiple translation services: Microsoft Translator, Google Translate, DeepL, OpenAI, Youdao, Baidu, and Alibaba Translate. Most of these require an API key that the user obtains by registering with the respective service and then entering in the plugin settings. Microsoft Translator and Google Translate can be used without configuration for basic use. Text-to-speech is also available through Microsoft Edge TTS, Google TTS, and OpenAI TTS, so words and phrases can be read aloud. The most common use cases are: selecting a word or phrase in the editor and translating it in a popup, translating API documentation that appears in Quick Documentation panels, and replacing a selected piece of text with its translation. The replace feature is particularly useful when renaming variables or identifiers, since it can output the translation in camel case or with a configurable word separator to match code naming conventions. Documentation can also be set to translate automatically whenever it is opened. The plugin is written in Kotlin and can be installed from within any supported IDE by searching for Translation in the JetBrains Marketplace. Manual installation from a downloaded file is also possible. The active translation engine can be switched quickly from the status bar at the bottom of the IDE window. A Word Book feature lets users save translations for later review.

Copy-paste prompts

Prompt 1
I have TranslationPlugin installed in IntelliJ IDEA. How do I configure DeepL as my default translation engine and set my API key?
Prompt 2
Show me how to use the TranslationPlugin replace feature to translate a selected Chinese variable name to English camelCase in one step.
Prompt 3
How do I enable automatic documentation translation in TranslationPlugin so Quick Documentation panels always appear in English?
Prompt 4
I want to use OpenAI as the translation engine in TranslationPlugin. Walk me through registering the API key and switching to that engine.
Prompt 5
How do I use TranslationPlugin keyboard shortcuts to translate a selected word in the editor and hear it read aloud with text-to-speech?
Open on GitHub → Explain another repo

← yiiguxing on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.