Overview Version History Q & A Rating & Review
超棒的对照翻译 / Awesome Compare Translation
中文 | English
中文
在原文旁边显示翻译结果的对照翻译 VS Code 插件。极致轻量化,极致速度!
建议使用GLM(智谱)api,速度最快,官网注册可免费获得大量token!
功能特性
🔤 选中翻译
选中文本后,立即触发悬浮窗翻译,速度极快
也可通过快捷键 Ctrl+Shift+T (Mac: Cmd+Shift+T) 翻译
支持翻译 VS Code 任意页面的文本 (如扩展介绍、更新日志等)
📋 剪贴板翻译
快捷键 Ctrl+Alt+T (Mac: Cmd+Alt+T) 直接翻译剪贴板内容
适用于从任意位置复制的文本(网页、PDF、其他应用等)
翻译结果在侧边面板中显示
📖 对照翻译
一键翻译当前文档中的所有注释/段落
快捷键 Ctrl+Shift+I (Mac: Cmd+Shift+I) 切换对照翻译
译文在原文旁边显示,方便对照阅读
🤖 多引擎支持
Google Translate API
Microsoft Translator API
OpenAI / ChatGPT API
DeepSeek API
GLM (智谱) API
💾 智能缓存
本地缓存已翻译内容,避免重复请求
7天自动过期,最多缓存1000条
🎨 自定义样式
🌐 国际化支持
界面支持中文和英文切换
通过配置 uiLanguage 选择界面语言
安装
打开 VS Code
按 Ctrl+Shift+X 打开扩展面板
搜索 "超棒的对照翻译" 或 "Awesome Compare Translation"
点击安装
快速开始
1. 配置 API Key
首次使用前,需要配置翻译 API:
按 Ctrl+Shift+P 打开命令面板
输入 "对照翻译: 设置 API Key"
选择翻译引擎并输入对应的 API Key
2. 翻译选中文本
选中需要翻译的文本
按 Ctrl+Shift+T 或右键选择 "翻译选中文本"
查看翻译结果
3. 对照翻译
打开需要翻译的文件
按 Ctrl+Shift+I 或右键选择 "切换对照翻译"
文档中的注释/段落会自动显示翻译
配置选项
在 VS Code 设置中搜索 "awesomeCompareTranslation" 可配置以下选项:
配置项
说明
默认值
uiLanguage
界面语言
zh-CN
engine
翻译引擎
google
apiKey
API 密钥
-
targetLanguage
目标语言
zh-CN
sourceLanguage
源语言
auto
displayStyle.color
译文颜色
-
displayStyle.opacity
译文透明度
0.8
proxy.enabled
启用代理
false
proxy.host
代理地址
127.0.0.1
proxy.port
代理端口
7890
快捷键
功能
Windows/Linux
Mac
翻译选中文本/剪贴板
Ctrl+Shift+T
Cmd+Shift+T
翻译剪贴板内容
Ctrl+Alt+T
Cmd+Alt+T
切换对照翻译
Ctrl+Shift+I
Cmd+Shift+I
命令列表
对照翻译: 翻译选中文本/剪贴板 - 翻译选中文本或剪贴板内容
对照翻译: 翻译剪贴板内容 - 翻译剪贴板中的文本
对照翻译: 切换对照翻译 - 开启/关闭对照翻译
对照翻译: 设置 API Key - 配置翻译 API
对照翻译: 查看翻译历史 - 查看翻译历史记录
对照翻译: 清除翻译历史 - 清除所有翻译历史
English
A VS Code extension that displays translation results alongside the original text for easy comparison.
Features
🔤 Selection Translation
Select text and translate via Ctrl+Shift+T (Mac: Cmd+Shift+T) or right-click menu
Supports translating text from any VS Code page (extensions, changelogs, etc.)
📋 Clipboard Translation
Ctrl+Alt+T (Mac: Cmd+Alt+T) to translate clipboard content directly
Works with text copied from anywhere (web pages, PDFs, other apps)
Results displayed in a side panel
📖 Compare Translation
One-click translation for all comments/paragraphs in current document
Ctrl+Shift+I (Mac: Cmd+Shift+I) to toggle compare translation
Translation displayed next to original text for easy comparison
🤖 Multiple Translation Engines
Google Translate API
Microsoft Translator API
OpenAI / ChatGPT API
DeepSeek API
GLM (Zhipu) API
💾 Smart Caching
Local cache for translated content to avoid repeated requests
Auto-expires after 7 days, max 1000 entries
🎨 Customizable Style
Configurable translation color and opacity
Supports dark/light theme adaptation
🌐 Internationalization
UI supports Chinese and English
Configure via uiLanguage setting
Installation
Open VS Code
Press Ctrl+Shift+X to open Extensions panel
Search for "Awesome Compare Translation"
Click Install
Quick Start
Before first use, configure a translation API:
Press Ctrl+Shift+P to open Command Palette
Type "Compare Translation: Set API Key"
Select translation engine and enter API Key
2. Translate Selected Text
Select text to translate
Press Ctrl+Shift+T or right-click and select "Translate Selection"
View translation result
3. Compare Translation
Open a file to translate
Press Ctrl+Shift+I or right-click and select "Toggle Compare Translation"
Comments/paragraphs will automatically show translations
Configuration
Search "awesomeCompareTranslation" in VS Code settings:
Option
Description
Default
uiLanguage
UI Language
zh-CN
engine
Translation engine
google
apiKey
API key
-
targetLanguage
Target language
zh-CN
sourceLanguage
Source language
auto
displayStyle.color
Translation color
-
displayStyle.opacity
Translation opacity
0.8
proxy.enabled
Enable proxy
false
proxy.host
Proxy host
127.0.0.1
proxy.port
Proxy port
7890
Keyboard Shortcuts
Function
Windows/Linux
Mac
Translate Selection/Clipboard
Ctrl+Shift+T
Cmd+Shift+T
Translate Clipboard
Ctrl+Alt+T
Cmd+Alt+T
Toggle Compare Translation
Ctrl+Shift+I
Cmd+Shift+I
Commands
Compare Translation: Translate Selection/Clipboard - Translate selected text or clipboard
Compare Translation: Translate Clipboard - Translate clipboard content
Compare Translation: Toggle Compare Translation - Enable/disable compare translation
Compare Translation: Set API Key - Configure translation API
Compare Translation: View History - View translation history
Compare Translation: Clear History - Clear all translation history
Supported Languages
简体中文 (zh-CN) | 繁体中文 (zh-TW) | English (en) | 日本語 (ja) | 한국어 (ko) | Français (fr) | Deutsch (de) | Español (es) | Русский (ru) | Português (pt) | Italiano (it) | العربية (ar) | Tiếng Việt (vi) | ไทย (th)
Get API Keys
Google Translate
Visit Google Cloud Console
Create project and enable Cloud Translation API
Create API credentials
Microsoft Translator
Visit Azure Portal
Create Translator resource
Get key
OpenAI
Visit OpenAI Platform
Create API Key
DeepSeek
Visit DeepSeek Platform
Create API Key
GLM (智谱/Zhipu)
Visit Zhipu AI Platform
Create API Key
License
MIT License