VSCode Comment Translation ExtensionThis extension helps developers translate comments, strings, code hints, error messages, and variable names in their code. IntroductionMany excellent projects have extensive comments to help users quickly understand the code's intent. If users are not familiar with the language of the comments, it can be challenging to understand. This extension provides multiple translation scenarios to help developers comprehend and write multilingual code more easily. It supports common translation services like Google, Bing, AliCloud, and DeepL, and allows developers to add custom translation services. FeaturesCode ReadingThe extension identifies multilingual content like comments and strings in the source code using TextMate, translates them quickly, and displays them via Hover, minimizing disruption to development. Hover Translation: Move the mouse over comments, strings, or selected areas to see the translated content in a hover box. Other hover content like exceptions and code documentation are also translated and displayed. Immersive Reading: Turn on immersive comment translation to automatically translate comments and display them in the document. The translated results can be shown alongside the original text or in place of it; toggle the display mode with Translation and ReplacementThe extension can translate source code content and quickly replace it in the document. For instance, translate a description and use it as a variable name; in multilingual development scenarios, translate a string and replace it in the document. Translate Variable Naming: Translate the current description into English and provide various variable names to choose from, then replace the original description. ![naming](https://github.com/intellism/vscode-comment-translate/raw/HEAD/<./doc/image/full naming.gif>) Hover Replacement: The hover box provides the ability to replace text with the translation result, which replaces the original content. Full Text Replacement Translation: Supports translating and replacing strings, comments, and selected areas with one click. GitHub Copilot Chat Participant: @translate
This extension extends GitHub Copilot by enabling translations in the Chat box using Copilot's AI model. The target language is set by CommentTranslate. Select text in the Editor and send it to GitHub Copilot Chat for quick translation using commands. Useful Commands
The extension provides translation or replacement commands for various scenarios, with shortcuts for some common functionalities. Users can also customize shortcuts according to their habits.
Translation ServicesThe extension supports the following translation services:
Third-party translation services can be found by searching for Common Configurations
Support UsIf you find this extension helpful, please consider supporting us in the following ways:
|