
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@qwen-code/translator
Advanced tools
A universal documentation translator for any GitHub project. Instantly translate docs with AI and automatically build a Nextra-based documentation site.
A documentation translation tool specifically designed for the github project. Automatically sync documentation from GitHub repositories, translate with Qwen AI, and build a multilingual Nextra documentation site.
npm install -g @qwen-code/translator
Initialize a new translation project:
qwen-translator init
Configure environment variables:
cp .env.example .env
# Edit .env file and add your Qwen API key
Sync source repository documents:
qwen-translator sync
Translate documents:
qwen-translator translate
Generate Nextra meta files:
qwen-translator sort
Start the documentation site:
npm install
npm run dev
init
Initialize a new translation project with interactive configuration. Sets up project structure, copies Nextra template, and creates configuration files.
sync [options]
Sync source repository documents and automatically translate changes.
-f, --force
: Force sync all documents (ignores previous sync records)translate [options]
Translate documents to target languages.
-l, --language <lang>
: Specify target language (zh, de, fr, ru, ja)-f, --file <file>
: Specify single file to translatesort [options]
Generate _meta.ts
files for Nextra documentation based on translated content. Uses AI to create proper navigation structure.
-l, --language <lang>
: Generate meta files for specific language only-d, --directory <dir>
: Generate meta files for specific directory onlyconfig
View and manage project configuration interactively.
status
Show current project status, configuration, and environment setup.
The tool creates a translation.config.json
file during initialization:
{
"name": "project-name",
"sourceRepo": "https://github.com/QwenLM/qwen-code.git",
"docsPath": "docs",
"sourceLanguage": "en",
"targetLanguages": ["zh", "de", "fr", "ru"],
"outputDir": "content"
}
Create a .env
file with the following variables:
# Required: Qwen API key
OPENAI_API_KEY=your_qwen_api_key
# Optional: API configuration (defaults shown)
OPENAI_BASE_URL=https://api.qwen.ai/v1
QWEN_MODEL=qwen3-coder-plus
QWEN_MAX_TOKENS=4000
You can also use other compatible endpoints:
# DashScope (Aliyun)
OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1/
QWEN_MODEL=qwen-turbo
After initialization, your project will have:
├── content/
│ ├── en/ # Source language documents (synced from repo)
│ ├── zh/ # Chinese translations
│ ├── de/ # German translations
│ ├── fr/ # French translations
│ └── ru/ # Russian translations
├── app/ # Next.js app directory (from template)
│ ├── [lang]/ # Dynamic language routing
│ └── layout.tsx # App layout
├── .source-docs/ # Raw synced documentation
├── .temp-source-repo/# Temporary git clone (auto-managed)
├── translation.config.json
├── translation-changelog.json # Translation history
├── last-sync.json # Sync tracking
├── .env.example
├── next.config.mjs
└── package.json
_meta.ts
files for proper Nextra navigation# Install dependencies
npm install
# Build the CLI tool
npm run build
# Run in development mode (watch mode)
npm run dev
# Run tests
npm test
MIT
This tool is specifically designed for the Qwen Code project. For feature requests or bug reports, please open an issue in the project repository.
FAQs
A universal documentation translator for any GitHub project. Instantly translate docs with AI and automatically build a Nextra-based documentation site.
We found that @qwen-code/translator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.