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
Select the text you want to translate in the editor
Either:
Press Alt+T (Windows/Linux) or Cmd+Shift+T (macOS)
Right-click and select "Translate" from the context menu
Choose your target language from the dropdown list
The selected text will be replaced with the translation
Quick Translation to Default Language
Select the text you want to translate
Press Alt+D (Windows/Linux) or Cmd+Shift+D (macOS)
The text will be automatically translated to your default target language
Configure API Keys
Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
Type "Text Translator: Configure API Keys"
Select your preferred translation service
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