언어 설정: Claude Code와 Codex가 원하는 언어로 답하게 만들기
CLAUDE.md와 AGENTS.md로 Claude Code와 Codex의 응답 언어를 설정하고, 코드를 깨뜨리지 않으면서 비영어 프롬프트를 작성하며, UTF-8 파일과 악센트 문자, CJK 경로를 처리하는 방법
API 키가 필요하신가요? 회원가입 →엔드포인트 & Base URL →
이 페이지 목차
게이트웨이 쪽에는 언어 전환 기능이 없어요: cr_ 키는 어떤 모델에 접근할 수 있는지만 결정할 뿐, 답변이 어떤 언어로 돌아오는지는 정하지 않아요. 언어는 도구에 무엇을 하라고 알려주는지로 정해지며, 대표적인 두 에이전트에는 각각 그 내용을 적어 두는 공식 문서화된 위치가 있어요.
이 페이지는 언어에 관한 내용이에요. 지시 파일 자체의 일반적인 구조는 CLAUDE.md 설정 가이드와 AGENTS.md 설정 가이드를 참고하세요.
1. 세션 안에서 요청하기¶
가장 빠른 방법은 말로 하는 거예요. 프롬프트를 원하는 언어로 쓰거나, "answer in Portuguese" 같은 명시적인 지시를 덧붙이면 돼요. 즉시 동작하고 설정도 필요 없지만, 그 대화 안에서만 유효해요. 세션을 넘어 유지하고 싶은 내용은 아래 파일에 넣어야 해요.
2. CLAUDE.md로 고정하기 (Claude Code)¶
공식 문서의 표현은 이래요: "CLAUDE.md files are markdown files that give Claude persistent instructions for a project, your personal workflow, or your entire organization." 언어 규칙은 바로 그런 종류의 지시예요.
| 범위 | 파일 |
|---|---|
| 엔터프라이즈 | macOS: /Library/Application Support/ClaudeCode/CLAUDE.md · Linux 및 WSL: /etc/claude-code/CLAUDE.md · Windows: C:\Program Files\ClaudeCode/CLAUDE.md |
| 사용자 | ~/.claude/CLAUDE.md |
| 프로젝트 | ./CLAUDE.md 또는 ./.claude/CLAUDE.md |
| 로컬 | ./CLAUDE.local.md |
규칙은 한 블록에 짧게 넣으세요:
## Response language
- Reply in the language of my message unless I say otherwise.
- If I name a language explicitly (for example: "reply in 日本語"), use it for the whole session.
- Keep code, identifiers, file paths, shell commands and log output exactly as they are.
- Do not translate English comments, commit messages or API names inside files.
공식 문서에 나온 세 가지 도우미 기능이에요:
- "Run /init to generate a starting CLAUDE.md automatically." — 발견할 수 있는 내용을 작성해 줘요. 언어 규칙은 직접 추가해야 해요.
- "The /memory command lists your CLAUDE.md, CLAUDE.local.md, and other memory file locations across user and project scopes" — 수정한 파일이 실제로 로드되는 파일인지 확인할 때 사용하세요.
- "CLAUDE.md files can import additional files using @path/to/import syntax." — 언어 규칙을 여러 저장소가 공유하는 별도 파일에 두고 싶을 때 편리해요.
Claude Code는 AGENTS.md도 읽을 수 있어요: "Claude Code can read AGENTS.md as project instructions, allowing compatibility with other coding agents without adding CLAUDE.md.", 그리고 "CLAUDE.md takes precedence over AGENTS.md by default." 따라서 하나의 저장소를 두 도구가 함께 쓴다면 규칙을 AGENTS.md에 한 번만 쓰고, Claude Code에 추가로 필요한 내용이 있을 때만 CLAUDE.md를 더하세요.
3. AGENTS.md로 고정하기 (Codex)¶
"Codex reads AGENTS.md files before doing any work." Codex는 시작할 때 지시 체인을 구성하며, 언어 규칙에는 탐색 순서가 중요해요:
- 전역 범위 — Codex 홈(기본값은
~/.codex,CODEX_HOME을 설정했다면 그 경로)에서 "Codex readsAGENTS.override.mdif it exists. Otherwise, Codex readsAGENTS.md." 이 수준에서는 비어 있지 않은 첫 번째 파일만 사용해요. - 프로젝트 범위 — "Starting at the project root (typically the Git root), Codex walks down to your current working directory." 각 디렉터리는 최대 하나의 파일을 제공해요:
AGENTS.override.md, 그다음AGENTS.md, 그다음project_doc_fallback_filenames에 있는 이름이에요. - 병합 순서 — "Codex concatenates files from the root down […] Files closer to your current directory override earlier guidance because they appear later in the combined prompt."
## Response language
- Reply in the language of my message unless I say otherwise.
- Keep code, identifiers, file paths, shell commands and log output exactly as they are.
- Refer to files by their real names, including non-ASCII characters.
숫자로 명확한 주의 사항이 하나 있어요: "Codex skips empty files and stops adding files once the combined size reaches the limit defined by project_doc_max_bytes (32 KiB by default)." 언어 규칙은 두 줄이니, 긴 모노레포 체인의 끝이 아니라 잘림을 피할 수 있도록 파일 위쪽에 두세요.
AGENTS.md 설정 가이드에 있는 저희 팀 가이드라인은 이래요: 파일은 원하는 언어로 쓰거나 영어로 쓸 수 있어요. 개인 프로젝트라면 편한 언어를 쓰고, 공유 저장소라면 코드와 일관성을 유지할 수 있도록 영어를 권장해요. 영어로 작성된 언어 규칙이 다른 언어로 답하라고 요구하는 조합이 일반적이에요.
4. 어떤 파일을 수정할까¶
| 목표 | 여기에 작성 |
|---|---|
| 내 컴퓨터의 모든 프로젝트 | ~/.claude/CLAUDE.md 그리고 ~/.codex/AGENTS.md |
| 팀원과 공유하는 하나의 프로젝트 | 저장소에 커밋하는 ./AGENTS.md (두 도구 모두 읽어요) |
| 나만 쓰는 하나의 프로젝트 | Claude Code는 ./CLAUDE.local.md, Codex는 내 하위 디렉터리의 더 깊은 AGENTS.md |
5. 비영어 프롬프트: 예상할 수 있는 것¶
- 프롬프트는 토큰을 소모해요. 원하는 언어로 쓴 프롬프트도 다른 프롬프트와 똑같이 과금돼요. 중국어의 경우 "1 character typically corresponds to 1-2 tokens" (과금 설명 참고)이므로, 메모리 파일에 한 번 쓴 긴 규칙이 매 메시지마다 반복하는 것보다 저렴해요.
- 코드 언어가 아니라 답변 언어를 요청하세요. 식별자, CLI 플래그, 오류 문자열, 파일 경로를 번역하면 답변을 쓸 수 없게 돼요. 위 예시 블록이 코드를 원래 형태로 유지하는 이유예요.
- 답변이 다시 영어로 돌아간다면 규칙이 늦게 읽히거나 덮어써지고 있을 가능성이 커요.
/memory나/context로 로드된 파일을 확인하고, 더 깊은AGENTS.md나AGENTS.override.md가 우선하고 있는지 확인하세요(3절의 병합 순서 참고).
6. 파일 인코딩, 악센트, 비ASCII 경로¶
언어 설정은 바이트 수준의 문제이기도 해요. 어디서나 통하는 세 가지 규칙이에요:
파일은 UTF-8로 유지하세요. "UTF-8 is the universal code page for internationalization and is able to encode the entire Unicode character set. It is used extensively on the web and is the default encoding for both XML and *nix-based platforms." 편집기에서 CLAUDE.md / AGENTS.md를 UTF-8로 저장하세요. 깨진 메모리 파일은 깨진 채로 읽혀요.
Windows에는 터미널 앞에 콘솔 코드 페이지가 있어요. "Changes the active console code page. If used without parameters, chcp displays the number of the active console code page." — 목록에는 중국어용 936도 있어요. 콘솔에서 비ASCII 출력이 이상하게 보이면 먼저 그 코드 페이지를 확인하세요. UTF-8 프로세스를 실행할 때 Microsoft가 권장하는 방법은 activeCodePage 속성("As of Windows Version 1903 (May 2019 Update), you can specify the activeCodePage property…") 또는 시스템 전체의 "Beta: Use Unicode UTF-8 for worldwide language support" 옵션이에요.
chcp
chcp 936
악센트 문자와 CJK 이름은 같아 보여도 다른 바이트일 수 있어요. Unicode Standard는 "canonical equivalence" 를 "characters or sequences of characters which represent the same abstract character […] when correctly displayed should always have the same visual appearance and behavior." 사이의 동등성으로 정의해요. 따라서 화면에서 똑같아 보이는 두 파일 이름도 바이트가 다를 수 있으니:
- 에이전트가 경로를 다시 입력하지 말고 목록에서 복사하게 하세요(예시 규칙에 "Refer to files by their real names, including non-ASCII characters" 라고 되어 있어요);
- 공백이나 CJK 문자가 포함된 경로는 모든 셸 명령에서 따옴표로 감싸세요;
- Git의 이스케이프를 꺼서
git status와git diff가 이름을 그대로 출력하게 하세요: "When this configuration option is set to false, git will not quote pathnames in the output of commands likegit statusandgit diff[…] The default value istrue."
git config --global core.quotepath false
7. 체크리스트¶
- [ ] 규칙이 도구가 실제로 로드하는 파일에 있어요(
/memory,/context, 또는 Codex 체인의 앞부분). - [ ] 답변 언어를 명시하고 동시에 코드, 경로, 명령을 번역하지 말라고 지정했어요.
- [ ] 파일이 UTF-8로 저장되어 있어요.
- [ ] 비ASCII 경로는 다시 입력하지 않고 도구 출력에서 복사했어요.
- [ ] 하나의 저장소에서 두 도구를 모두 쓴다면 규칙이
AGENTS.md에 있어요(또는 의도적으로 중복해 두었어요).
관련 페이지¶
- CLAUDE.md 설정 가이드
- AGENTS.md 설정 가이드
- Claude Code 완전 튜토리얼
- Codex 완전 튜토리얼
- 출력 형식: json / text / stream-json
- CLI 팁
- 중국 본토 외 지역 사용자를 위한 QCode
QCode 시작하기
Claude Code, Codex 등에 API 키 하나를 쓰세요. 토큰 단위로 과금하며 모델별 가격은 qcode.cc/models에 있어요