Easy Translate is a VSCode extension that allows you to quickly translate selected English text. It uses the Baidu Translate API to translate selected English text into Chinese and automatically copies the translated result to the clipboard. Users can configure their own APP_ID and SECRET_KEY for the Baidu Translate API.
Features
Removes comment markers (// and /* */) from the selected text.
Translates selected English text into Chinese.
Copies the translation result to the clipboard automatically.
Supports keyboard shortcuts for quick use.
Installation
Download and install the VSCode extension:
Use the command palette (Ctrl+Shift+P or Cmd+Shift+P), and type Extensions: Install from VSIX....
Select and install the .vsix file.
Usage
Select a piece of English text.
Use the shortcut Ctrl+Shift+T (or your custom shortcut) to trigger the translation.
The translated result will be automatically copied to the clipboard, and you can use it directly.
Configuration
To configure your Baidu Translate API keys in the settings.json file: