Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>VSCode Text TranslatorNew to Visual Studio Code? Get it now.
VSCode Text Translator

VSCode Text Translator

volcanic

|
57 installs
| (0) | Free
Translates selected text to a target language using Microsoft, DeepL, Youdao, or Tencent APIs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Text Translator

简体中文

A Visual Studio Code extension that provides instant text translation using multiple translation services with secure API key management and cross-platform keyboard shortcuts.

🌟 New Features

  • Secure API Key Storage: API keys are now encrypted and stored in VS Code's secure secret storage
  • Improved Error Handling: Better error messages with specific API error details
  • Cross-Platform Shortcuts: Optimized keyboard shortcuts for both macOS and Windows
  • Enhanced Tencent API Support: Fixed response parsing for Tencent Cloud translation service
  • Visual API Key Configuration: New interactive configuration interface with password visibility toggle

Features

  • Multiple Translation Services:

    • Microsoft Translator
    • DeepL
    • Youdao
    • Tencent Cloud
  • Two Translation Modes:

    • Interactive target language selection (Alt+T / Cmd+Shift+T)
    • Quick translation to default language (Alt+D / Cmd+Shift+D)
  • Secure Configuration:

    • Encrypted API key storage
    • Visual configuration interface
    • Password visibility toggle for easy input
  • Additional Features:

    • Context menu integration
    • Automatic source language detection
    • Configurable default target language
    • Cross-platform keyboard shortcuts
    • Comprehensive error handling

🚀 Usage

Interactive Translation

  1. Select the text you want to translate in the editor
  2. Either:
    • Press Alt+T (Windows/Linux) or Cmd+Shift+T (macOS)
    • Right-click and select "Translate" from the context menu
  3. Choose your target language from the dropdown list
  4. The selected text will be replaced with the translation

Quick Translation to Default Language

  1. Select the text you want to translate
  2. Press Alt+D (Windows/Linux) or Cmd+Shift+D (macOS)
  3. The text will be automatically translated to your default target language

Configure API Keys

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Type "Text Translator: Configure API Keys"
  3. Select your preferred translation service
  4. Enter your API credentials in the secure input interface

⚙️ Configuration

Settings

Open VS Code Settings and search for "Text Translator" to configure:

  • Translation Service: Choose between Microsoft, DeepL, Youdao, or Tencent
  • Default Target Language: Set your preferred language for quick translation
  • Microsoft API Region: Configure your Azure region (default: global)
  • Context Menu: Toggle context menu visibility
  • Auto Language Detection: Enable/disable automatic source language detection
  • Preserve Formatting: Keep text formatting in translations

API Key Configuration

Microsoft Translator

  • Secret ID: textTranslator.microsoftKey (stored securely)
  • API Region: textTranslator.microsoftApiRegion

DeepL

  • API Key: textTranslator.deepLKey (stored securely)

Youdao

  • App Key: textTranslator.youdaoAppKey (stored securely)
  • App Secret: textTranslator.youdaoSecretKey (stored securely)

Tencent Cloud

  • Secret ID: textTranslator.tencentId (stored securely)
  • Secret Key: textTranslator.tencentKey (stored securely)

🔑 Getting API Keys

Microsoft Translator

  1. Visit Azure Portal
  2. Create a Translator resource
  3. Get your API key and region from the resource overview

DeepL

  1. Visit DeepL API
  2. Sign up for an API account
  3. Get your API key from the account dashboard

Youdao

  1. Visit Youdao AI Platform
  2. Create a new application
  3. Get your App Key and App Secret

Tencent Cloud

  1. Visit Tencent Cloud Console
  2. Enable Machine Translation service
  3. Get your SecretId and SecretKey from the API key management

⌨️ Keyboard Shortcuts

Action Windows/Linux macOS
Translate to Target Language Alt+T Cmd+Shift+T
Translate to Default Language Alt+D Cmd+Shift+D
Configure API Keys Command Palette: "Text Translator: Configure API Keys" Command Palette: "Text Translator: Configure API Keys"

🌍 Supported Languages

  • English (en)
  • Chinese (zh)
  • Japanese (ja)
  • Korean (ko)
  • French (fr)
  • German (de)
  • Spanish (es)
  • Italian (it)
  • Russian (ru)

🔧 Troubleshooting

Common Issues

  1. Keyboard shortcuts not working:

    • Ensure text is selected in the editor
    • Check for conflicts with other extensions
    • Try using the command palette instead
  2. API errors:

    • Verify your API credentials are correct
    • Check your internet connection
    • Ensure the translation service is enabled in your account
  3. Missing API key prompt:

    • Use the configuration command to set up your API keys
    • Keys are securely stored and won't be lost on extension updates

Error Messages

The extension provides detailed error messages for:

  • Missing or invalid API credentials
  • Network connectivity issues
  • Service-specific API errors
  • Rate limiting and quota exceeded
  • Invalid response formats

📋 Requirements

  • VS Code 1.96.0 or higher
  • Active internet connection for translation services
  • Valid API credentials for chosen translation service

📝 License

This extension is licensed under the MIT License.

🤝 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests on our GitHub repository.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft