Dev Translate is a powerful, lightweight VS Code extension designed for developers working in international teams or exploring foreign codebases. Translate code comments, strings, and documentation instantly without ever leaving your editor.
✨ Key Features
Instant Selection Translation: Select any text and translate it to your target language with one click.
Developer Rewrite: Automatically convert text into clean, standardized English code comments (e.g., // This is a formatted comment).
Bulk Comment Translation: Scan your entire file and translate every single-line and multi-line comment (//, #, /* */) while preserving your code's logic.
Status Bar Integration: A dedicated "Global Language" indicator in the status bar for quick switching.
Smart Logic: Our regex engine is context-aware—it translates comments but ignores URLs (no more broken https:// links!).
Progressive Feedback: Real-time progress bars for bulk translation tasks.
🚀 How to Use
1. Translate Selection
Highlight any text in your editor.
Right-click and select "Dev Translate: Translate Selection" (or use the Command Palette).
A notification will appear with the result. Choose to Replace, Copy, or Change Language.
2. Rewrite for Developers
Select a rough note or a sentence in another language.
Select "Dev Translate: Rewrite for Developers".
It will be converted into a perfectly formatted English code comment.
3. Translate All Comments
Open any source file.
Run "Dev Translate: Translate Comments in File".
Watch as all your code comments are translated in the background via a batch process.
4. Quick Language Switch
Click the 🌐 icon in the Bottom Right Status Bar to instantly change your target language for the entire workspace.
⚙️ Extension Settings
This extension contributes the following settings:
devTranslator.defaultLanguage: Set your preferred target language code (e.g., en, hi, es, fr). Default is en.
🌍 Supported Languages
We support 20+ major languages including:
🇺🇸 English (en)
🇮🇳 Hindi (hi)
🇪🇸 Spanish (es)
🇫🇷 French (fr)
🇩🇪 German (de)
🇨🇳 Chinese (zh-cn)
🇯🇵 Japanese (ja)
🇰🇷 Korean (ko)
🇧🇷 Portuguese (pt)
🇷🇺 Russian (ru)
...and many more!
🛠️ Installation
Open VS Code.
Press Ctrl+P, type ext install your-publisher-name.dev-translator.
Click Install.
Restart VS Code or reload the window.
🛡️ Privacy & Performance
Safety First: Your code logic remains untouched. Only comments and selections are processed.
Concurrency: Bulk translations are handled in parallel batches to ensure speed even in large files.
API: Powered by the reliable Google Translate API.
🙌 Contributing & Support
Found a bug or have a feature request? Please open an issue on our GitHub Repository.
Enjoying Marker Pen? Consider leaving a ⭐ on the Marketplace!