Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>md-to-zhNew to Visual Studio Code? Get it now.
md-to-zh

md-to-zh

md-to-zh

| (0) | Free
Translate Markdown files using AI models (OpenAI, Azure, Claude) with preview support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Markdown Translator

A VSCode extension for translating Markdown files using AI models with preview support.

Features

  • AI-Powered Translation: Translate Markdown files using OpenAI, Azure OpenAI, Anthropic Claude, or any OpenAI-compatible API
  • Preview Panel: View translated content side-by-side with the original
  • Code Block Preservation: Optionally preserve code blocks without translation
  • Multiple API Support: Configure different AI providers

Installation

From VSIX (Local)

  1. Download the .vsix file
  2. Open VSCode
  3. Go to Extensions (Ctrl+Shift+X)
  4. Click the "..." menu and select "Install from VSIX..."

From Marketplace

Search for "Markdown Translator" in the Extensions marketplace.

Configuration

Open VSCode settings and search for "Markdown Translator":

Setting Description Default
mdTranslator.apiProvider AI API provider openai
mdTranslator.apiKey API Key for the AI model ""
mdTranslator.apiEndpoint Custom API endpoint URL ""
mdTranslator.model Model name to use gpt-4o
mdTranslator.sourceLanguage Source language (auto for auto-detect) auto
mdTranslator.targetLanguage Target language for translation Chinese
mdTranslator.preserveCodeBlocks Preserve code blocks without translation true

Usage

Commands

  • Translate Markdown: Translate the current Markdown file
  • Translate Markdown with Preview: Translate and open a preview panel
  • Open Translated Preview: Open preview for an already translated file

Context Menu

Right-click on a Markdown file in the editor or explorer to access translation commands.

Keyboard Shortcuts

You can configure keyboard shortcuts in VSCode's Keyboard Shortcuts editor.

Examples

Translate a README file

  1. Open a README.md file
  2. Right-click and select "Translate Markdown with Preview"
  3. The translated file will be saved as README.chinese.md
  4. Preview panel shows the translation result

Use with Custom API

  1. Set mdTranslator.apiProvider to custom
  2. Set mdTranslator.apiEndpoint to your API URL
  3. Set mdTranslator.apiKey to your API key
  4. Translate as usual

Supported AI Providers

  • OpenAI: GPT-4, GPT-4o, GPT-3.5-turbo
  • Azure OpenAI: Azure's OpenAI service
  • Anthropic: Claude models (via OpenAI-compatible endpoint)
  • Custom: Any OpenAI-compatible API

Output File Naming

Translated files are saved with a language suffix:

  • README.md → README.chinese.md
  • docs.md → docs.japanese.md

Requirements

  • VSCode 1.85.0 or higher
  • An API key from a supported AI provider

Known Issues

  • Large files may take longer to translate
  • Some complex Markdown structures may need manual review

Release Notes

0.0.1

  • Initial release
  • Support for OpenAI, Azure, and custom APIs
  • Preview panel for translated content
  • Code block preservation option

License

MIT License

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft