A VS Code extension that automatically detects quoted strings in your code and offers translation to other languages or text enhancement/rephrasing capabilities.
- Automatically detects quoted strings in any programming language
- Supports various quote types:
- Double quotes:
"text" - Single quotes:
'text' - Template literals:
`text`(JavaScript/TypeScript) - Triple quotes:
"""text"""(Python) - Verbatim strings:
@"text"(C#)
- Double quotes:
- Smart filtering to exclude code-like strings
- Real-time detection as you type
- Translate selected text or detected strings to multiple languages
- Configurable target languages
- Multiple output options:
- Replace original text
- Insert translation as comment
- Copy to clipboard
- Open in new document
- Rephrase and enhance text in various styles:
- Formal
- Casual
- Concise
- Detailed
- Professional
- Creative
- Same flexible output options as translation
- Dedicated sidebar panel showing all detected strings
- Context menus for quick actions
- Keyboard shortcuts for efficient workflow
- Click on detected strings to jump to their location
- Translate Text (
Ctrl+Shift+T): Translate selected text - Enhance Text (
Ctrl+Shift+E): Enhance/rephrase selected text - Detect Strings (
Ctrl+Shift+D): Manually detect all strings in current file
- Open the "Text Translator" panel in the Explorer sidebar
- View all detected strings in the current file
- Click on any string to jump to its location
- Right-click for translation and enhancement options
- Right-click on selected text for translation/enhancement options
- Use the toolbar in the sidebar panel for bulk operations
Customize the list of available translation languages:
"textTranslator.targetLanguages": [
"Spanish",
"French",
"German",
"Italian",
"Portuguese",
"Russian",
"Chinese",
"Japanese"
]Configure available text enhancement options:
"textTranslator.enhancementTypes": [
"Formal",
"Casual",
"Concise",
"Detailed",
"Professional",
"Creative"
]Enable/disable automatic string detection:
"textTranslator.autoDetectStrings": trueShow/hide inline action buttons:
"textTranslator.showInlineActions": trueThe extension detects strings in all programming languages with special support for:
- JavaScript/TypeScript (including template literals)
- Python (including triple-quoted strings)
- C# (including verbatim strings)
- PHP
- And many more!
- Open VS Code
- Go to Extensions (Ctrl+Shift+X)
- Search for "Text Translator & Enhancer"
- Click Install
Note: This extension currently uses mock translation and enhancement for demonstration. To use real translation services, you would need to:
- Integrate with translation APIs (Google Translate, Azure Translator, etc.)
- Add AI text enhancement services (OpenAI, Azure OpenAI, etc.)
- Configure API keys in settings
Contributions are welcome! Please feel free to submit issues and enhancement requests.
MIT License - see LICENSE file for details.