WidgiLabs Translate
A VSCode/Cursor extension that brings Google Translate-style translation functionality directly into your editor!

✨ Features
Translation Panel
- 🌐 Two-column translation interface (like Google Translate)
- 🔄 Auto-translate as you type (with debounce)
- 🔀 Quick language swap
- 📋 Copy translation with one click
- 🎨 Modern and responsive interface
- 🌓 Automatic dark/light theme support
Quick Translation
- 💡 Lightbulb Quick Action - Select text and click the lightbulb
- ⚡ Instant Translation - Translate and replace with keyboard shortcut
- 🎯 Context menu integration
- 🔧 Configurable default languages
Multiple Translation Engines
- 🔵 Google Translate - Fast and accurate (Free) ⭐ Recommended
- 🔵 Microsoft Translator - Good quality (Free with limits)
- 🟢 MyMemory - Translation Memory (Free up to 1000 words/day)
- 🟢 LibreTranslate - Open Source (Requires server)
Supported Languages
- 🇵🇹 Portuguese
- 🇬🇧 English
- 🇪🇸 Spanish
- 🇫🇷 French
- 🇩🇪 German
- 🇮🇹 Italian
- 🇯🇵 Japanese
- 🇰🇷 Korean
- 🇨🇳 Chinese
- 🇷🇺 Russian
- 🇸🇦 Arabic
📦 Installation
From VSCode Marketplace
- Open VSCode/Cursor
- Go to Extensions (
Ctrl+Shift+X
)
- Search for "WidgiLabs Translate"
- Click Install
From VSIX
- Download the
.vsix
file
- Open VSCode/Cursor
- Go to Extensions (
Ctrl+Shift+X
)
- Click
...
→ Install from VSIX...
- Select the downloaded file
🎯 How to Use
Open Translation Panel
Keyboard Shortcut: Ctrl+Alt+Shift+T
(Windows/Linux) or Cmd+Alt+Shift+T
(Mac)
Command Palette: Ctrl+Shift+P
→ Type "WidgiLabs: Open Translator"
Quick Translation Methods
1. Lightbulb Quick Action (CodeAction)
- Select any text in the editor
- Click the 💡 lightbulb that appears
- Choose "🌐 Translate selection"
- Pick an action: Copy, Replace, or Open Translator
2. Instant Translate & Replace
- Select text
- Press
Ctrl+Alt+T
(or Cmd+Alt+T
on Mac)
- Text is automatically translated and replaced!
- Select text
- Right-click
- Choose "WidgiLabs: Translate Selection"
- Pick an action
Translation Panel Features
- Type or paste text in the left panel
- Auto-detect source language or select manually
- Select target language
- Swap languages with the ⇄ button
- Copy translation with one click
- Clear both fields instantly
- Auto-translate triggers 1 second after you stop typing
⚙️ Configuration
Open VSCode Settings (Ctrl+,
) and search for "WidgiLabs Translate":
Translation Engine
Choose your preferred translation service:
- Google Translate (Default) - No setup required
- Microsoft Translator - Requires API key
- MyMemory - Free tier available
- LibreTranslate - Self-hosted or public server
Default Languages
- Default Source Language - Set default "from" language (Default: Auto-detect)
- Default Target Language - Set default "to" language (Default: Portuguese)
LibreTranslate URL
If using LibreTranslate, specify your server URL (Default: https://libretranslate.com)
⌨️ Keyboard Shortcuts
Shortcut |
Action |
Ctrl+Alt+Shift+T |
Open translation panel |
Ctrl+Alt+T |
Quick translate & replace selected text |
Ctrl+Enter |
Translate (inside panel) |
Mac users: Replace Ctrl
with Cmd
🛠️ Development
Prerequisites
- Node.js 18+
- npm or yarn
- VSCode or Cursor
Setup
# Clone the repository
git clone https://github.com/yourusername/widgilabs-translate.git
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Run in development mode
# Press F5 in VSCode to open Extension Development Host
Project Structure
widgilabs-translate/
├── src/
│ └── extension.ts # Main extension code
├── out/ # Compiled files (generated)
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
├── LICENSE # MIT License
├── CHANGELOG.md # Version history
└── README.md # This file
Available Scripts
npm run compile
- Compile TypeScript
npm run watch
- Compile and watch for changes
npm run vscode:prepublish
- Prepare for publishing
Building VSIX
# Install vsce (VSCode Extension Manager)
npm install -g @vscode/vsce
# Package extension
vsce package
# This generates widgilabs-translate-1.0.0.vsix
🤝 Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
)
- Commit your changes (
git commit -m 'Add amazing feature'
)
- Push to the branch (
git push origin feature/amazing-feature
)
- Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🐛 Known Issues
- Microsoft Translator requires API key configuration
- LibreTranslate requires a running server instance
- MyMemory has a daily limit of 1000 words for free tier
🔮 Roadmap
- [ ] Add more translation engines
- [ ] Translation history
- [ ] Batch translation support
- [ ] Custom language pairs
- [ ] Offline translation support
💬 Support
If you encounter any issues or have suggestions, please open an issue.
⭐ Show Your Support
If you find this extension useful, please consider giving it a star on GitHub!
Developed with ❤️ by WidgiLabs