Skip to content

Translation Services

Service List

ServiceAuthenticationCostDescription
VS Code CopilotZero configRequires Copilot subscriptionRecommended, no extra configuration needed
ChatGPT / OpenAIAPI KeyPay per useRequires OpenAI API Key
Google TranslationFree (limited)FreeNo configuration needed, but has rate limits
Bing / Azure TranslatorAPI KeyPay per useRequires Azure account
DeepLXLocal deploymentFreeRequires local service deployment
Baidu TranslationAPP_ID + KeyPay per useRequires Baidu Translation account
Tencent TranslationSecretId + SecretKeyPay per useRequires Tencent Cloud account

API Key Acquisition

OpenAI

  1. Visit OpenAI Platform
  2. Register/Login
  3. Go to API Keys page
  4. Click "Create new secret key"
  5. Copy the generated API Key (format: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)

Baidu Translation

  1. Visit Baidu Translation Open Platform
  2. Register/Login
  3. Go to Console
  4. Enable General Translation API service
  5. Get APP_ID and Secret Key

Tencent Translation

  1. Visit Tencent Cloud
  2. Register/Login
  3. Enable Machine Translation service
  4. Go to API Key Management
  5. Get SecretId and SecretKey

Bing / Azure Translator

  1. Visit Azure Portal
  2. Register/Login
  3. Create Translator resource
  4. Go to resource → "Keys and Endpoint"
  5. Copy API Key and Region

DeepLX

  1. Visit DeepLX or DeepLX GitHub
  2. Follow instructions for local deployment
  3. Default URL: http://127.0.0.1:1188
  4. No additional configuration needed

Switching Methods

Shortcut Key

Press Alt+Shift+S to quickly switch translation service.

Command Palette

  1. Press Ctrl+Shift+P
  2. Type "Switch Translation Service"
  3. Select the service to use

Service Features

VS Code Copilot

  • Pros: Zero config, high translation quality
  • Cons: Requires Copilot subscription
  • Recommendation: First choice

Google Translation

  • Pros: Free, no configuration needed
  • Cons: Has rate limits
  • Recommendation: Backup service

OpenAI

  • Pros: High translation quality
  • Cons: Requires API Key, pay per use
  • Recommendation: Use when high quality translation is needed

Baidu Translation

  • Pros: Domestic service, fast speed
  • Cons: Requires account registration
  • Recommendation: Recommended for domestic users

Tencent Translation

  • Pros: Domestic service, fast speed
  • Cons: Requires Tencent Cloud account
  • Recommendation: Recommended for domestic users

Service Degradation

When translation service fails, the plugin automatically degrades by priority:

Current service failed → Degrade to next service → All services failed → Degrade to pinyin

Auto Language Detection

All translation services support auto language detection, capable of translating:

  • Chinese
  • Japanese
  • Korean
  • Russian
  • Any other non-English characters

Released under the MIT License.