README.md
January 9, 2026 · View on GitHub
English | 简体中文
Vscode Extension —— Chinese and English sliding word translation
Local (Offline) Translation
This extension can optionally call a local HTTP translate server.
- (Recommended) Create venv and install deps:
python3 -m venv .venv
source .venv/bin/activate
pip install -r local_server/requirements.txt
pip install torch
- Enable settings:
translate.useLocal: truetranslate.local.autoStart: true
The default start command is python3 -u local_server/app.py --host 127.0.0.1 --port 0.
If you use venv, set:
translate.local.command:./.venv/bin/python -u local_server/app.py --host 127.0.0.1 --port 0
Fully Offline (No Network)
If you want zero network access (no model downloads), you must provide model files locally.
- Set
translate.local.offline: true - Provide one of:
translate.local.model.root: a folder that containsen-zh/andzh-en/model directories- OR
translate.local.model.enZhandtranslate.local.model.zhEn: explicit local paths
Notes:
- In offline mode, the server uses
local_files_only=trueand will fail fast if files are missing.