claude-code-zh-cn: Patching Chinese Into a CLI That Has No i18n Layer
Claude Code CLI 简体中文本地化 / 汉化插件;支持 macOS、Linux、WSL、Windows 与新版 native,一行安装,更新后自动修复。
At a glance
- What is it?
- A four-layer localization plugin for Claude Code that edits a 13MB cli.js in place, injects settings through hooks, and restores from backup on uninstall. It is a pragmatic answer to a real gap, and its main risk is the thing it patches.
- Who is it for?
- Adopt it if you use Claude Code on macOS, Linux, WSL or Windows and want a Chinese terminal experience without forking the CLI; the plugin market install is two commands and the uninstall path restores from backup.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly JavaScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The 13MB cli.js With No i18n Layer
Claude Code ships its interface strings hardcoded. The README states the UI text lives mainly in a 13MB cli.js and that there is no i18n infrastructure, which is why the author expects no official Chinese support in the near term. That is the problem this project addresses, and it is a narrower problem than it first appears. The plugin does not translate model output. It translates the chrome around it: spinner verbs, waiting prompts, system notifications, interface labels, and the default reply language. The README quotes 187 spinner verbs, 41 Chinese tips, 2007 interface translation entries, and localized reply-duration text such as "琢磨了 1分23秒". The audience is a Chinese-speaking developer who already uses Claude Code daily and finds the English scaffolding around the model irritating rather than blocking. Anyone who only wants Chinese answers from the model does not need this; that is a prompt or settings concern.
Four Layers, and Only One of Them Touches the Binary
The README describes the mechanism as four layers: settings injection, the Hook system, the plugin system, and CLI patch. Layer 1 writes Chinese values into settings.json, covering language, spinnerTipsEnabled, spinnerTipsOverride and spinnerVerbs. Layer 2 uses a session-start hook to merge that configuration on startup, and a UserPromptSubmit hook to intercept the in-session slash commands. Layer 3 registers the project through the Claude Code plugin manager, or falls back to an equivalent standalone hook when the installed CLI cannot register plugins formally. Layer 4 patches the hardcoded strings inside cli.js. The layering is the design's best property: if Layer 4 fails on an unrecognized build, Layers 1 through 3 still apply, and the README says unadapted strings simply stay English without affecting startup. The same document notes that on Windows native .exe builds at 2.1.113 or later, Layer 4 requires a global node-lief install and is skipped without it. So on that platform the deepest layer is optional in practice, not guaranteed.
Installing via the Plugin Marketplace
The README gives two installation routes. The plugin market route is platform-agnostic and needs no local clone: run claude plugin marketplace add --scope user https://github.com/taekchef/claude-code-zh-cn, then claude plugin install claude-code-zh-cn@claude-code-zh-cn --scope user, then restart Claude Code once so the session-start hook merges the spinner, tips and interface configuration. The remote script route is a single pipeline: curl -fsSL https://github.com/taekchef/claude-code-zh-cn/releases/latest/download/install-remote.sh | bash. The README is explicit that this installs the localization plugin, not Claude Code itself, and that users without a claude command should install the official CLI first. For source work there is git clone followed by ./install.sh, and on Windows powershell -NoProfile -ExecutionPolicy Bypass -File install.ps1. After installation, the zh-cn-setup skill can be invoked from inside Claude Code to fill in missing spinner configuration and report patch status. The README stresses that this script only fills gaps and does not overwrite existing manual configuration.
In-Session Switching and What /english Actually Restores
Version 2.12.0 added /chinese and /zh alongside /english and /en. These are handled by a UserPromptSubmit hook, and the README states they consume no tokens and display results immediately. The split behaviour is worth reading closely: language settings and spinner verbs update right away, while hardcoded interface strings need a Claude Code restart to take full effect. /english removes the Chinese settings and restores the CLI text from backup. The backup discipline is the part that makes this project defensible. The README says the installer backs up original files before patching, and that failed patching, repackaging or startup self-checks keep or restore the originals. Uninstall reverses the CLI backup and removes the Chinese settings, hooks and plugin registration while leaving other Claude Code configuration alone. That is a stronger safety story than most binary-patching tools offer, and it is stated as a design commitment rather than an observation.
Uninstall Deletes Four Fields It Cannot Attribute
The README admits a real limitation in the uninstall path. The script cannot tell whether language, spinnerTipsEnabled, spinnerTipsOverride and spinnerVerbs were written by the plugin or configured by hand, so it removes all four. If you maintained those fields yourself, the README tells you to back them up first. There is a second trap for users of CC Switch: if installation agreed to sync Chinese settings into CC Switch, those same four fields must be deleted from CC Switch's Claude general configuration, otherwise switching providers can write them back. The README also notes that ZH_CN_SKILL_I18N_EXTRA_ROOTS translates SKILL.md files but does not write CC Switch's ~/.cc-switch/cc-switch.db, and that a separate optional script, cc-switch-descriptions.js, is needed for that, with --apply required to write and a database backup produced automatically. Skill descriptions are not rewritten by default because the same description drives menu display and model triggering, so the README asks users to run the --dry-run command first.
Version Windows Are the Real Adoption Constraint
The README's badge block and docs/support-matrix.md define the supported windows: npm builds from 2.1.92 to 2.1.112, macOS native from 2.1.113 to 2.1.265, Linux native from 2.1.220 to 2.1.265, and Windows native from 2.1.113 to 2.1.265. Those are ranges, not guarantees. The badge for macOS native and the badge for Windows native share the same upper bound of 2.1.265, which suggests the matrix is refreshed alongside releases rather than derived from a stable interface. The README's own framing supports that reading: it says unverified new versions are handled by automatic degradation, untranslatable parts stay English, and the CLI never breaks. That is a reasonable posture for a patch tool, but it means the honest expectation is partial coverage after a Claude Code update until the plugin catches up. Anyone who needs a predictable, fully translated interface on every release should treat the support matrix as the gating document, not the feature list.
Against Forking the CLI or Waiting for Official i18n
The obvious alternative is to fork Claude Code and translate cli.js in your own repository. That gives you full control over every string and no dependency on a third party's release cadence. The cost is that you now own a 13MB generated bundle, and every upstream release becomes a merge problem. This plugin takes the opposite approach: it patches the installed artifact at install time, keeps a backup, and re-applies after updates, so upstream changes arrive normally and the translation is a layer on top. A second alternative is doing nothing and waiting for official Chinese support, which the README explicitly argues against on the grounds that the UI is hardcoded and no i18n infrastructure exists. The trade-off is clear. Forking buys completeness and costs maintenance. Patching buys low maintenance and costs coverage on unverified versions. There is also a sibling project, codex-code-zh-cn, by the same author for Codex CLI, with /chinese and /english switching described as working the same way.
Maintenance Cost and the MIT Licence
The repository is MIT licensed, which permits commercial and private use, modification and redistribution provided the copyright notice and permission notice are retained. That is a permissive baseline, and nothing in the supplied material suggests additional terms or a contributor licence agreement. This is not legal advice; read LICENSE and your organization's policy. The practical maintenance cost is different. The release history shows v2.16.0 on 2026-09-08, v2.15.1 the same day, and v2.15.0 the day before, which is a fast cadence tracking an upstream CLI that also moves quickly. If you adopt this, you are accepting a dependency that needs to be re-run or re-installed after Claude Code updates, and the README's auto-repair claim is the mechanism that reduces, not eliminates, that work. The plugin market install and the remote script both pull the latest release, so updating is cheap. The expensive part is verifying coverage after each upstream bump, and the support matrix is where that verification starts.
Editorial conclusion
Adopt it if you use Claude Code on macOS, Linux, WSL or Windows and want a Chinese terminal experience without forking the CLI; the plugin market install is two commands and the uninstall path restores from backup. Do not adopt it if you maintain your own language, spinnerVerbs or spinnerTipsOverride values in settings.json, because the uninstall script deletes those four fields unconditionally, or if you run a Claude Code build outside the version windows in docs/support-matrix.md. Before installing, check your claude --version against that matrix and back up the four settings fields yourself.
Community notes