Bug: Codex cannot switch to the Chinese interface (localeOverride does not take effect)
Open 💬 4 comments Opened Jun 10, 2026 by xiaobai1690281
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
概述
Codex Desktop 无法切换为中文界面,尽管相关配置和翻译数据均已存在。
环境
- 应用版本: 26.608.12217 (0.138.0-alpha.7)
- Electron/Chromium: 149.0.7827.54
- 操作系统: macOS (Apple Silicon)
- macOS 系统语言: zh_CN (zh-Hans-CN)
问题描述
将 config.toml 中设置 localeOverride = "zh-CN" 并通过 defaults write 设置 AppleLanguages = zh-Hans-CN 后,重启应用,界面仍为英文。
技术分析
- 中文翻译数据存在:app.asar 中共有 15,632 条唯一中文 UI 字符串
- localeOverride 配置被应用代码系统正确解析
- Electron app.getLocale() 返回 zh-CN
- ``
根因``:Web UI(React/Vite)的 i18n 初始化代码将 locale 硬编码为 en-US,没有读取 localeOverride 配置
建议修复
Web UI 的 i18n 初始化处应将默认 locale 改为从以下渠道读取(按优先级):
- config.toml 中的 localeOverride 值
- Electron app.getLocale() 返回值
- navigator.language
- 回退到 en-US
4 Comments
English translation:
Overview
Codex Desktop cannot switch to the Chinese interface, even though the relevant configuration and translation data already exist.
Environment
Problem description
After setting localeOverride = "zh-CN" in config.toml and setting AppleLanguages = zh-Hans-CN via defaults write, the interface remains in English after restarting the app.
Technical analysis
Root cause``: the Web UI (React/Vite) i18n initialization code hard-codes the locale to en-US and does not read the localeOverride configurationSuggested fix
The Web UI’s i18n initialization should change the default locale to read from the following sources (in priority order):
<!-- codex-issue-translator -->
same here on Windows
+1
+1