Repository navigation
Open
Labels
appIssues related to the Codex desktop appconfigIssues involving config.toml, config keys, config merging, or config updatesenhancementNew feature or request
Description
What variant of Codex are you using?
App
What feature would you like to see?
问题描述 / Problem
Codex 目前只内置了英文界面。配置项 localeOverride = "zh-CN" 虽然存在于 config.toml 中,但当前版本没有包含中文翻译资源,设置后界面仍然是英文。
Currently Codex only has English UI. The localeOverride = "zh-CN" setting exists in config.toml, but Chinese translation resources are not bundled in the current release.
调查发现 / Investigation
- Desktop version: 26.616.10790.0 (CLI v0.142.0)
- AppxManifest: 只声明了
<Resource Language="en-US" /> - locales/ 目录: 有
zh-CN.pak文件,但只覆盖 Electron/Chromium 壳层(右键菜单、文件对话框等),不影响 Codex 自身的 React UI - app.asar: Codex 的 React 前端编译在此文件中,未包含中文翻译
- 配置:
config.toml中的localeOverride = "zh-CN"配置项已存在且语法正确,但没有对应的翻译文件可加载
需要翻译的 UI 元素 / UI Elements Requiring Translation
1️⃣ 侧边栏 (Sidebar)
| 英文 (Current) | 中文 (Target) |
|---|---|
| New Chat | 新建对话 |
| Search threads... | 搜索对话... |
| Threads / Chats | 对话列表 |
| Settings | 设置 |
| Theme | 主题 |
| Font Size | 字体大小 |
| Language | 语言 |
| Shortcuts | 快捷键 |
| About | 关于 |
2️⃣ 顶部栏 (Top Bar)
| 英文 (Current) | 中文 (Target) |
|---|---|
| Model Selector | 模型选择 |
| Conversation title | 对话标题 |
3️⃣ 消息区域 (Messages)
| 英文 (Current) | 中文 (Target) |
|---|---|
| Thinking... | 思考中... |
| Copy | 复制 |
| Copy code | 复制代码 |
| Code copied | 已复制 |
| Show thinking | 显示思考过程 |
| Hide thinking | 隐藏思考过程 |
| Just now | 刚刚 |
| minutes ago | 分钟前 |
| hours ago | 小时前 |
| days ago | 天前 |
4️⃣ 输入区域 (Input Area)
| 英文 (Current) | 中文 (Target) |
|---|---|
| Type a message... | 输入消息... |
| Send | 发送 |
| Attach files | 附件 |
| Paste | 粘贴 |
| Search code | 搜索代码 |
| Press Enter to send, Shift+Enter for new line | Enter 发送,Shift+Enter 换行 |
| Ctrl+K to search | 按 Ctrl+K 搜索 |
5️⃣ 设置面板 (Settings)
| 英文 (Current) | 中文 (Target) |
|---|---|
| Model Settings | 模型设置 |
| Conversation Detail Mode | 对话详情模式 |
| Auto-suggestions | 自动建议 |
| Interface Language | 界面语言 |
| System Font Size | 系统字体大小 |
| Code Font Size | 代码字体大小 |
| Developer Options | 开发者选项 |
| Custom Model Provider | 自定义模型提供商 |
| Base URL | 接口地址 |
| API Key | API 密钥 |
| Sandbox Mode | 沙盒模式 |
| Elevated | 提权模式 |
6️⃣ 右键菜单 (Context Menu)
| 英文 (Current) | 中文 (Target) |
|---|---|
| Cut | 剪切 |
| Copy | 复制 |
| Paste | 粘贴 |
| Select All | 全选 |
| Copy Code Block | 复制代码块 |
| Copy Message | 复制消息 |
| Delete Message | 删除消息 |
| Edit Message | 编辑消息 |
7️⃣ 工具提示和状态 (Tooltips & Status)
| 英文 (Current) | 中文 (Target) |
|---|---|
| Connected | 已连接 |
| Disconnected | 已断开 |
| Reconnecting... | 重新连接中... |
| Streaming... | 正在生成... |
| Error | 错误 |
| Warning | 警告 |
| Loading... | 加载中... |
| No results | 无结果 |
| File not found | 文件未找到 |
| Permission denied | 权限被拒绝 |
8️⃣ 文件浏览器 (File Browser)
| 英文 (Current) | 中文 (Target) |
|---|---|
| Open File | 打开文件 |
| Save File | 保存文件 |
| Select Folder | 选择文件夹 |
| File name | 文件名 |
| File type | 文件类型 |
| Cancel | 取消 |
| Confirm | 确认 |
| Browse... | 浏览... |
建议的实现方式 / Implementation Suggestions
方案一:使用 react-i18next(推荐)
Codex 前端使用 React,react-i18next 是最成熟的国际化方案:
- 安装
react-i18next和i18next - 创建
public/locales/zh-CN/translation.json翻译文件 - 在应用初始化时检测
localeOverride配置,加载对应语言 - 将所有硬编码的字符串替换为
t()函数调用 - 确保语言切换无需重启应用
方案二:使用 TypeScript 国际化方案
如果项目已使用 TypeScript,也可以考虑用 typescript-i18n 或自定义方案:
- 创建
src/i18n/zh-CN.ts翻译映射 - 创建一个
useLocale()hook - 通过 Context 向下传递当前语言
- 构建时将所有语言的翻译打包
关键实现要点
- 读取
~/.codex/config.toml中的[desktop] localeOverride配置 - 监听语言配置变化,实时更新 UI
- 日期、时间等格式使用
IntlAPI 自动适配中文格式 - 支持 Plural(复数) 规则(中文不需要复杂复数形式)
- 代码块和终端输出保持英文原样,只翻译界面元素
参考 UI 设计 / Visual Reference
HTML 模拟界面文件: Codex中文界面模拟.html
(包含完整的中文界面布局和元素标注)
环境信息 / Environment
- OS: Windows 11 24H2
- Codex Desktop: v26.616.10790.0
- Codex CLI: v0.142.0
- Install source: Microsoft Store (WindowsApps)
其他用户反馈 / Additional Notes
中文开发者社区对 Codex 非常感兴趣,但语言门槛阻碍了广泛采用。根据开发者社区的反馈:
- 大量中国开发者习惯使用中文界面的开发工具(如 VS Code 中文版)
- 支持中文界面可以显著降低 AI 编程工具的入门门槛
- 建议同时支持 zh-CN(简体中文)和 zh-TW(繁体中文)
Additional information
No response
Metadata
Metadata
Assignees
Labels
appIssues related to the Codex desktop appconfigIssues involving config.toml, config keys, config merging, or config updatesenhancementNew feature or request
Activity
[-]添加中文界面支持 (Add Chinese UI Localization)[/-][+]Add Chinese UI Localization Support[/+]github-actions commentedon Jun 25, 2026
English translation:
What variant of Codex are you using?
App
What feature would you like to see?
Issue Description / Problem
Codex currently only includes an English UI. Although the
localeOverride = "zh-CN"setting exists inconfig.toml, the current version does not include Chinese translation resources, so the interface remains in English after setting it.Currently Codex only has English UI. The
localeOverride = "zh-CN"setting exists inconfig.toml, but Chinese translation resources are not bundled in the current release.Investigation / Investigation
<Resource Language="en-US" />zh-CN.pakfile, but it only covers the Electron/Chromium shell layer (context menus, file dialogs, etc.) and does not affect Codex's own React UIlocaleOverride = "zh-CN"configuration item inconfig.tomlalready exists and has correct syntax, but there is no corresponding translation file to loadUI Elements Requiring Translation / UI Elements Requiring Translation
1️⃣ Sidebar (Sidebar)
2️⃣ Top Bar (Top Bar)
3️⃣ Messages (Messages)
4️⃣ Input Area (Input Area)
5️⃣ Settings Panel (Settings)
6️⃣ Context Menu (Context Menu)
7️⃣ Tooltips & Status (Tooltips & Status)
8️⃣ File Browser (File Browser)
Suggested Implementation / Implementation Suggestions
Option 1: Use react-i18next (recommended)
Codex's frontend uses React, and react-i18next is the most mature internationalization solution:
react-i18nextandi18nextpublic/locales/zh-CN/translation.jsontranslation filelocaleOverrideconfiguration during app initialization and load the corresponding languaget()function callsOption 2: Use a TypeScript internationalization solution
If the project already uses TypeScript, you could also consider
typescript-i18nor a custom solution:src/i18n/zh-CN.tstranslation mapuseLocale()hookKey Implementation Points
[desktop] localeOverrideconfiguration from~/.codex/config.tomlIntlAPI to automatically adapt date, time, and other formats to Chinese formattingReference UI Design / Visual Reference
HTML mock UI file:
Codex中文界面模拟.html(Contains the complete Chinese interface layout and element annotations)
Environment Information / Environment
Other User Feedback / Additional Notes
The Chinese developer community is very interested in Codex, but the language barrier prevents broader adoption. According to feedback from the developer community:
Additional information
No response
github-actions commentedon Jun 25, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
julyaaj-lang commentedon Jul 10, 2026
+1, providing reproducible details from Codex CLI v0.x (commit unreleased as of 2026-07-10).
Repro:
[desktop] localeOverride = "zh-CN"in~/.codex/config.toml.LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8before launching.codexin Terminal on macOS 15.Observed:
Expected:
desktop.localeOverrideandLANGlike the desktop app does.Notes:
i18nmilestone.t!("…")macro, add afluentorgettextbackend, shiplocales/en-US.ftl+locales/zh-CN.ftl. Most CLI strings live incodex-rs/tui/andcodex-cli/src/utils/.中文摘要:CLI 完全没本地化,即使设了 localeOverride 和 LANG 也没用。希望官方引入 i18n 框架并合入中文 locale 文件。