Side Translate
Side Translate is a VS Code extension MVP that translates the current Markdown,
plain text, JSON, or YAML document into an editable side preview opened beside
the editor.
Features
- Adds a translate button to the editor title area for supported documents.
- Translates the current selection, or the full document when there is no selection.
- Detects Chinese-to-English or English-to-Chinese direction automatically.
- Preserves basic Markdown structure and skips fenced code blocks.
- Supports Markdown, plain text, JSON, JSONC, YAML, and YML by default.
- Lets you configure additional supported VS Code language IDs or file extensions.
- Uses a no-key fastest mode by default, racing Bing Translator and DeepL Free and returning the first successful result.
- Bing Translator, DeepL Free, and Google Translate are available as explicit configurable providers.
- Opens the side preview immediately, then translates large documents incrementally in configurable batches.
- Allows long-running translations to be stopped while keeping the translated blocks already shown in the preview.
- Lets you edit translated Chinese blocks in the side preview, back-translate them, and replace the matching source block.
Data Disclosure
Side Translate sends selected text or opened document text to the configured
third-party translation provider. Long documents are sent incrementally in
batches.
The default fastest provider sends text to both Bing Translator and DeepL Free,
then uses the first successful result. If configured explicitly, Side Translate
can also send text to Google Translate.
Do not use this extension with confidential or restricted documents unless your
organization allows sending that content to the selected third-party translation
service.
Supported Documents
The editor title button and command are enabled for these language IDs by default:
markdown, plaintext, json, jsonc, and yaml.
They are also enabled for these file extensions by default:
.md, .markdown, .txt, .json, .jsonc, .yaml, and .yml.
You can configure more document types with:
{
"vscode-side-translate.supportedLanguageIds": [
"markdown",
"plaintext",
"json",
"jsonc",
"yaml",
"typescript"
],
"vscode-side-translate.supportedFileExtensions": [
".md",
".txt",
".json",
".yaml",
".ts"
]
}
Markdown documents keep Markdown-specific handling. Other supported document
types are translated as plain text.
Development
npm install
npm run compile
npm test
npm run marketplace:check
Press F5 in VS Code to launch an Extension Development Host.
npm run marketplace:check intentionally fails until package.json has a real
Marketplace publisher, a real repository URL, and a LICENSE file.