A VS Code extension that uses the Zhipu Large Model or local llama.cpp server to translate Jupyter Notebook's Markdown cell into another language, and display the translation result below the original cell. The target language defaults to Chinese, and the default zhipu model used is glm-4.5-flash (which is free to use as of 2025-10-14).
Demo
Features
Translates the selected Markdown cell in Jupyter Notebooks.
Inserts the translated content as a new Markdown cell directly below the original cell.
Works with Zhipu AI or a local llama.cpp server (via llama-server).
Usage
Open a Jupyter Notebook (.ipynb) file in VS Code.
Select a Markdown cell you wish to translate.
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P),and search for "Translate Markdown cell in Jupyter Notebook" and execute the command.Or use the keyboard shortcut (default: Ctrl+Shift+T or Cmd+Shift+T).
After a brief wait, a new Markdown cell containing the translated text will be inserted below the original cell.
Requirements
Internet connection to access the Zhipu AI API.
A valid Zhipu AI API Key.
You can also use the llama.cpp server, but this requires you to manually start the service in the background through llama-server.exe.
Extension Settings
ipynbTranslator.serviceProvider:zhipu (default) or llama-server. Determines which backend the extension calls.
ipynbTranslator.zhipuApiKey:Zhipu AI API Key.Click here to apply for a Zhipu API key.
ipynbTranslator.zhipuModelName:LLM name.Default:glm-4.5-flash. Update this when using a different model on your llama.cpp server.
ipynbTranslator.zhipuSystemPrompt:Your requirements for the translation, such as the target language.
ipynbTranslator.llamaServerUrl:Base URL of the llama.cpp server.Default:http://127.0.0.1:8080
ipynbTranslator.llamaServerSystemPrompt:System prompt passed to the llama.cpp server.Default:翻译成中文,保持原有的Markdown格式