Translation plugin supporting Tencent Cloud, Baidu, and Youdao translation APIs. This extension helps developers translate text directly within VS Code.
Now supports VS Code 1.107.0 and later, macOS, Linux, and Windows.
- Context menu translation: Right-click on selected text and choose "tlcsdm" → "Translate" to translate.
- Keyboard shortcut: Press
Ctrl+Alt+T(Windows/Linux) orCmd+Alt+T(macOS) with selected text to translate. - Translation View: Dedicated panel for translation with source and target language selection.
- Status bar engine switch: Click the translation engine indicator in the status bar to switch between providers.
- Multiple providers: Support for Tencent Cloud, Baidu, and Youdao translation services.
- Configurable settings: Customize default engine, source/target languages, and API credentials.
- Select the text you want to translate
- Right-click to open context menu
- Select "tlcsdm" → "Translate"
- Select the text you want to translate
- Press
Ctrl+Alt+T(Windows/Linux) orCmd+Alt+T(macOS)
- Click the Translation icon in the Activity Bar
- Enter text in the source text area
- Select source and target languages
- Click "Translate" or enable auto-translation
- Click on the engine name in the status bar (bottom right)
- Or use Command Palette: "Translation: Switch Engine"
Open VS Code Settings and search for "Translation" to configure:
| Setting | Type | Default | Description |
|---|---|---|---|
tlcsdm.translation.defaultEngine |
string | tencent | Default translation engine |
tlcsdm.translation.sourceLanguage |
string | auto | Source language for translation |
tlcsdm.translation.targetLanguage |
string | zh | Target language for translation |
tlcsdm.translation.tencent.secretId |
string | Tencent Cloud SecretId | |
tlcsdm.translation.tencent.secretKey |
string | Tencent Cloud SecretKey | |
tlcsdm.translation.baidu.appId |
string | Baidu Translation API App ID | |
tlcsdm.translation.baidu.secretKey |
string | Baidu Translation API Secret Key | |
tlcsdm.translation.youdao.appKey |
string | Youdao Translation API App Key | |
tlcsdm.translation.youdao.appSecret |
string | Youdao Translation API App Secret |
| Code | Language |
|---|---|
| auto | Auto detect |
| zh | Chinese |
| en | English |
| ja | Japanese |
- Visit Tencent Cloud Console
- Create a new CAM user or use existing credentials
- Copy SecretId and SecretKey to extension settings
- Visit Baidu Translation Open Platform
- Create an application
- Copy App ID and Secret Key to extension settings
- Visit Youdao AI Open Platform
- Create an application
- Copy App Key and App Secret to extension settings
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X) - Search for "Translation"
- Click Install
- Download the
.vsixfile from Releases - In VS Code, open Command Palette (
Ctrl+Shift+P) - Search for "Extensions: Install from VSIX..."
- Select the downloaded
.vsixfile
Download from Jenkins
This project uses TypeScript and npm (Node.js 22).
# Install dependencies
npm install
# Compile
npm run compile
# Watch mode (for development)
npm run watch
# Lint
npm run lint
# Package
npx @vscode/vsce package
# Test
npm run test- eclipse-translation - Eclipse version of this plugin
MIT License - see LICENSE for details.