taekchef/claude-code-zh-cn

Claude Code CLI 简体中文本地化 / 汉化插件;支持 macOS、Linux、WSL、Windows 与新版 native,一行安装,更新后自动修复。

What it solves

Claude Code, a terminal-based AI programming assistant, lacks a native Simplified Chinese interface. This project provides a comprehensive localization plugin that translates the terminal UI, waiting prompts, system notifications, and default AI responses into Simplified Chinese, making the tool more accessible to Chinese-speaking developers.

How it works

The project employs a four-layer architecture to implement localization without requiring official i18n infrastructure:

  1. Settings Injection: Injects language, spinnerTipsOverride, and spinnerVerbs into the configuration file to change AI responses and spinner text.
  2. Hook System: Uses SessionStart and Notification hooks to inject Chinese context and translate system notifications.
  3. Plugin System: Implements a standard Claude Code plugin to provide a Chinese output style.
  4. CLI Patching: Uses a Node.js-based string literal scanner to find and replace hardcoded UI strings within the cli.js file or native binaries. It includes a safety mechanism that backs up original files and performs startup self-checks to ensure the CLI remains functional even if patching fails.

Who it’s for

Developers using Claude Code who prefer a Simplified Chinese interface and experience.

Highlights

  • Extensive Translation: Covers 2,065 UI strings, 187 quirky spinner verbs, and 41 spinner tips.
  • Cross-Platform Support: Works on macOS, Linux, and Windows (via PowerShell or WSL).
  • Safety First: Automatically backs up original files and restores them if patching or self-checks fail.
  • Automatic Updates: Detects version changes in Claude Code and attempts to re-patch the UI automatically.
  • Skill Localization: Optional functionality to translate the descriptions of installed Skills and plugin commands.

Related

  • Project
  • Project
  • Project
  • Project