hover-based comment and string translation
Translates code comments, string literals, and documentation hints on-demand by intercepting VS Code's hover provider API. When a developer hovers over code elements, the extension tokenizes the text using TextMate grammar rules to identify comments and strings, sends them to a configurable translation service (Google Translate, Bing, DeepL, AliCloud), and displays the translated text in a hover tooltip without modifying the source file. This preserves the original code while providing immediate comprehension without context switching.
Unique: Uses TextMate grammar tokenization to identify code elements (comments vs strings vs code) before translation, enabling language-aware translation that respects code structure rather than translating arbitrary text. Integrates with VS Code's native hover provider system for seamless UI integration without custom UI components.
vs alternatives: Faster than manual translation tools because it operates in-context within the editor; more accurate than regex-based comment detection because it uses proper AST-level tokenization via TextMate grammars.
immersive in-document translation overlay
Toggles an overlay mode (via Ctrl+Shift+Z) that displays translations directly in the editor document alongside or replacing original comment and string text. The extension renders translated text as inline decorations using VS Code's decoration API, allowing developers to read translated content without hovering. A secondary toggle (Ctrl+Shift+B) switches between 'alongside' mode (original + translation side-by-side) and 'replace' mode (translation replaces original), with the display mode persisting across the current session.
Unique: Leverages VS Code's decoration API to render translations as non-editable inline text overlays, preserving source file integrity while providing immersive reading experience. Dual-mode toggle (alongside vs replace) allows developers to switch between comparative and focused reading without reloading.
vs alternatives: More immersive than hover-only translation because it keeps translations visible during continuous code review; less intrusive than full-file replacement because 'alongside' mode preserves original context for reference.
command-palette-triggered text replacement translation
Provides a command palette command (accessible via Ctrl+Shift+?) that translates selected text in the editor and replaces it with the translated version in-place. The extension captures the user's text selection, sends it to the configured translation service, and writes the translated result back to the editor at the same location, modifying the source file. This enables one-off translations of specific code sections without toggling immersive mode.
Unique: Integrates with VS Code's command palette and editor selection API to provide a stateless, one-off translation workflow that modifies source files directly. No intermediate UI or preview step; translation result is immediately committed to the file.
vs alternatives: More direct than hover translation for developers who want to permanently change code; faster than copy-paste-to-external-tool workflows because it operates in-context.
variable naming suggestion with translation
Provides a 'Translate Variable Naming' command that translates a selected variable name or description into multiple naming suggestions in the target language. The extension sends the original name/description to the translation service and generates alternative naming options (e.g., camelCase, snake_case, PascalCase variants) based on the translated result. Developers can then manually select and replace the original variable name with one of the suggestions.
Unique: Combines translation with naming convention generation, producing multiple case-variant suggestions from a single translated term. Integrates with VS Code's command palette to surface naming suggestions without requiring external tools.
vs alternatives: More context-aware than generic naming tools because it translates the original variable description first; faster than manual renaming because it generates multiple options at once.
github copilot chat integration with @translate participant
Extends GitHub Copilot Chat with a `@translate` chat participant that allows developers to send selected code text to Copilot Chat for translation. The extension registers a custom chat participant that intercepts `@translate` mentions in Copilot Chat, passes the selected text to Copilot's AI model (not the configured translation service), and returns the translated result within the chat interface. This leverages Copilot's language understanding for context-aware translation rather than generic translation APIs.
Unique: Registers a custom chat participant with Copilot Chat API, allowing `@translate` mentions to trigger Copilot's language model for translation instead of external translation services. Keeps translation workflow within the chat interface for unified AI assistance.
vs alternatives: More context-aware than generic translation APIs because Copilot can understand code semantics; integrates with existing Copilot Chat workflow for developers already using Copilot as primary assistant.
configurable multi-service translation backend
Abstracts translation service selection through a configuration system that allows developers to choose between multiple translation providers (Google Translate, Bing Translator, AliCloud Translation, DeepL) and optionally configure custom translation services. The extension routes all translation requests through a service adapter pattern that normalizes API calls to different providers, allowing developers to switch services without changing their workflow. Configuration is managed through VS Code settings (specific setting names not documented).
Unique: Implements a service adapter pattern that normalizes API calls across heterogeneous translation providers (Google, Bing, DeepL, AliCloud, custom), allowing developers to swap services without workflow changes. Supports custom service integration for enterprise or regional requirements.
vs alternatives: More flexible than single-service tools because it supports multiple providers and custom backends; enables cost optimization by allowing service switching based on quota or pricing.
markdown document translation with preview
Translates Markdown content in VS Code's Markdown preview pane, displaying translated text alongside or replacing the original Markdown source. The extension hooks into VS Code's Markdown preview rendering pipeline to intercept and translate Markdown text before display. Developers can toggle translation on/off in the preview pane without modifying the source Markdown file.
Unique: Integrates with VS Code's Markdown preview rendering pipeline to translate content at render-time rather than modifying source files. Preserves Markdown structure while translating text content.
vs alternatives: More convenient than copying Markdown to external translation tools because it operates within VS Code's preview interface; preserves source file integrity by not modifying the original.
customizable keybinding shortcuts for translation actions
Allows developers to customize keyboard shortcuts for all translation actions (hover translation, immersive mode toggle, text replacement, variable naming) through VS Code's keybindings configuration. Default keybindings are provided (Ctrl+Shift+?, Ctrl+Shift+Z, Ctrl+Shift+B), but developers can override them in their keybindings.json file to match their preferred workflow. The extension respects VS Code's keybinding precedence and conflict resolution.
Unique: Leverages VS Code's native keybindings system to allow full customization of translation shortcuts without requiring extension-specific configuration UI. Respects VS Code's keybinding precedence and conflict resolution.
vs alternatives: More flexible than fixed keybindings because developers can adapt shortcuts to their workflow; integrates seamlessly with VS Code's keybinding ecosystem.
+1 more capabilities