Hover translator
VS Code extension to translate text and words on hover with support for multiple formats and languages.
Features
- ✨ Translate text on hover: Hover over any word or text to see translations
- 📝 Smart format detection: Automatically detects and translates identifiers in various formats:
snake_case (e.g., user_name)
camelCase (e.g., userName)
PascalCase (e.g., UserName)
kebab-case (e.g., user-name)
Title Case (e.g., User Name)
- 🔍 Block translation: Select and translate entire code blocks
- 🌍 Support for multiple languages:
- English, Vietnamese, French, German, Spanish, Italian, Portuguese, Russian, Chinese, Japanese, Korean
- ⚙️ Easy configuration: Select language from status bar
- 🎛️ Quick toggle: Click on status bar to enable/disable
Usage
- Hover over any word or text in your code to see its translation
- Select a block of text and hover to translate the entire selection
- Use the command "Translate Selected Block" to translate and optionally replace or copy the translated text
- Click on the status bar to:
- Toggle the extension on/off
- Select translation language
Configuration
Configure in VS Code settings:
variableTranslate.enabled: Enable/disable translation on hover (default: true)
variableTranslate.targetLanguage: Target language for translation (default: Vietnamese)
Commands
Variable Translate: Toggle Variable Translate: Toggle extension on/off
Variable Translate: Select Translation Language: Select translation language
Variable Translate: Translate Selected Block: Translate selected text block and optionally replace or copy
| |