How to Make Claude Code Reply in Chinese: 3 Methods and Checks

Blog / Developer tools

How to Make Claude Code Reply in Chinese: 3 Methods and Checks

The most reliable way to get Claude Code to answer in Chinese is to put a language preference in CLAUDE.md. If you put it in the user-level file ~/.claude/CLAUDE.md, it applies to every project. This setting controls which language the replies use, not which language the interface displays, and you need to treat those two separately. Below is the distinction, plus snippets you can copy as-is.

What is the difference between interface language and reply language?

People searching for "Claude Code in Chinese" usually mix up two different things:

  • Reply language: the language of the explanations, summaries, and commit messages the model writes. The model decides this, and you can influence it with instructions.
  • Interface language: the menus, slash-command descriptions, errors, and prompts in the terminal. This is text that ships with the program. Whether it is localized, and into which languages, depends on the official documentation and your current version. Don't expect prompts to change it.

So the practical answer to the "Claude Code language" question is that replies can be pinned to Chinese, while the interface mostly stays in whatever language the program ships with. Even if you tell the model to speak Chinese, command descriptions such as /help may still be in English.

One more thing trips people up. Even with a Chinese preference, code identifiers, commands, and original error messages should usually stay as they are. The snippets below say so explicitly.

Method 1: Put the language preference in the project's CLAUDE.md

CLAUDE.md is an instruction file that Claude Code reads at the start of every session, and it is the right place for project conventions. If the language preference applies only to this project, put it in the CLAUDE.md at the project root. For how to write this file, see What is CLAUDE.md? How to write one that actually helps Claude Code.

Add a short section to the file:

## 语言约定
- 用简体中文回复,包括解释、方案说明和总结。
- 代码、变量名、命令、报错原文保持原样,不翻译。
- 代码注释和提交信息用中文。

(In English, the section reads: reply in Simplified Chinese, including explanations, plans, and summaries; leave code, variable names, commands, and original error text untouched; write code comments and commit messages in Chinese.)

Adjust the last line to match your team's habits. If your repository's commit messages have always been in English, write "commit messages in English" instead, so the instruction doesn't conflict with existing practice.

Method 2: Put it in the user-level CLAUDE.md so it applies to all projects

If you don't want to repeat this in every project, put the same content in ~/.claude/CLAUDE.md in your home directory (create the file if it doesn't exist). On Linux and macOS you can do it like this:

mkdir -p ~/.claude
cat >> ~/.claude/CLAUDE.md <<'EOF'
## 语言约定
- 用简体中文回复。
- 代码、命令、报错原文保持原样。
EOF

On Windows the home directory path is different, so check the official documentation for the exact location. If you use WSL, put the file in your home directory inside WSL; see Claude Code on Windows: native install or WSL?.

The user-level and project-level files can both exist. If both state a language requirement and the two conflict, don't rely on guesses about which one overrides the other. Keep them consistent, or write the requirement in only one place.

Method 3: Use a settings.json language option, or just say it in the session

settings.json may have options related to reply language, but field names and values change between versions, so I won't hard-code them here. Check the settings page of the official documentation to confirm whether your current version supports one. For how settings.json layers and priorities work, see Claude Code settings.json: layers, precedence, and env configuration.

If you only need it temporarily, you don't have to change any file. Just say it at the start of the session:

接下来请全程用简体中文回复,代码和命令保持原样。

(That is: "For the rest of this session, reply in Simplified Chinese and keep code and commands unchanged.")

This only lasts for the current session, which makes it good for trying things out. To pin the behavior long term, write it into CLAUDE.md.

How do I confirm the setting took effect?

Don't go by feel. Verify with this checklist:

  1. Exit the current session and run claude again so it re-reads CLAUDE.md.
  2. Ask a question in plain English, for example What does this repo do?, and see whether the reply is still in Chinese.
  3. Ask it to change one line of code and explain it, and confirm that code and variable names were not translated.
  4. Ask it to generate a commit message and confirm the language matches the convention you wrote.
  5. Use the method in the official documentation (for example the /memory command) to view which memory files are currently loaded, and confirm that both the user-level and project-level files were read.

Step 2 is the most telling. If an English question still gets a Chinese reply, your preference has overridden the default tendency to follow the language of the question.

Why does English still show up occasionally after setup?

Some common causes:

SymptomLikely causeWhat to do
Replies turn English late in a long sessionIn a very long session, the influence of early instructions may fadeRepeat the instruction, or start a new session
Terminal prompts and command descriptions are in EnglishThat is interface text, not a replyPrompts can't change it; follow the official documentation
Error explanations contain the original English textYou asked for original error text to stay as-isExpected behavior; adjust that line of the convention if you want
No effect in one project but fine elsewhereThe file is in the wrong directory, or the filename has the wrong caseConfirm it is CLAUDE.md in the project root

If nothing works at all, first confirm that the directory where you launch claude is the project root, then go back and check the filename. For common commands, see the Claude Code commands cheat sheet. If you haven't finished installing yet, see How to use Claude Code: from installation to your first code change.

Don't want to depend on a Claude account? How else can you connect?

The language setting has nothing to do with how you log in. CLAUDE.md works the same whether you use subscription login, an API key, or a custom endpoint. If you are looking for a way to connect that doesn't require an overseas credit card, you can look at AGI Plan. It is a multi-provider LLM aggregation gateway sold as a monthly subscription, paid in RMB. Tools such as Claude Code and Codex only need one endpoint URL changed, and you can switch between several capability groups using the same quota. AGI Plan is a commercial partner of cdnping. Note that the service states it is not an officially authorized channel, and some models are marked "overseas only"; check agiplan.dev/models for the specifics.

For setup steps, see agiplan.dev/startup. For the general method of configuring an endpoint URL, see Claude Code custom API, plus Codex and OpenCode endpoint configuration. For using Claude Code without a Claude account, see Can you use Claude Code without a Claude account? Endpoint URL setup explained.

If replies are slow or fail midway, rule out server-side problems first: check the recent API probe results on cdnping's Anthropic status page, then decide whether it is a problem in your own configuration.

Next steps

  1. Write the "language convention" above into ~/.claude/CLAUDE.md.
  2. Restart claude and ask a question in English to verify that the reply is in Chinese.
  3. Then add project-specific conventions to the project's CLAUDE.md, such as the language of comments and commit messages.
  4. After a version update, go back to the official documentation and check whether there are new language or interface settings.

Related articles

Keep reading