Codex desktop language selector does not apply on Windows-无法汉化

Open 💬 4 comments Opened May 27, 2026 by lianggang405-bit

What issue are you seeing?

Windows客户端遇到无法切换多语言支持情况:
Codex Windows build 26.519.81530
Windows package: OpenAI.Codex_2p2nqsd0c76g0
localeOverride = "zh-CN" is saved in C:\Users\Administrator\.codex\config.toml
The language selector accepts zh-CN and other languages, but the UI always stays English.
Chinese language resources exist in the package.
Reset app data, logged out/in, changed networks, reset Windows network stack, and verified HTTPS/TLS now works.
Latest logs show: reason=statsig-disabled

What steps can reproduce the bug?

Codex Windows build 26.519.81530
Windows package: OpenAI.Codex_2p2nqsd0c76g0
localeOverride = "zh-CN" is saved in C:\Users\Administrator\.codex\config.toml
The language selector accepts zh-CN and other languages, but the UI always stays English.
Chinese language resources exist in the package.
Reset app data, logged out/in, changed networks, reset Windows network stack, and verified HTTPS/TLS now works.
Latest logs show: reason=statsig-disabled

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

maheerCodes · 3 months ago

Thanks for the detailed report.

I was able to reproduce something similar on Windows where the language selector accepts the locale change, but the UI remains in English after restart.

A few things that may help narrow this down for the Codex team:

  • The localeOverride = "zh-CN" entry appears to save correctly in:

C:\Users\Administrator\.codex\config.toml .

  • Since the Chinese language resources already exist in the package, this may be related to:
  • locale initialization during startup.
  • cached renderer state.
  • or Windows-specific language fallback logic.

You already tested most common fixes (reset app data, relogin, network reset), so this does look like an actual application-side bug rather than configuration error.

Possible workaround to test:

  1. Fully exit Codex from Task Manager.
  2. Delete:
  • %APPDATA%\OpenAI Codex .
  • %LOCALAPPDATA%\OpenAI Codex .
  1. Reboot Windows .
  2. Launch Codex once in English.
  3. Then switch to zh-CN before opening any workspace.

It may also help developers if you attach:

  • config.toml .
  • startup logs after changing locale.
  • screenshot of Settings → Language.
  • Windows display language + region settings.

The reason=statsig-disabled log line might also be relevant if localization rollout depends on feature flags.

This looks like a valid Windows localization bug.

lianggang405-bit · 2 months ago

Codex Windows 本地化 Bug 诊断报告问题摘要

Codex 的「设置 → 语言」切换功能在 Windows 上完全不生效——选择任何语言后 UI 均保持英文,即时切换无效(非重启回退问题)。
------------------------------
环境信息
项目 值
操作系统 Windows 11 Build 26200
Codex 版本 26.527.3686.0 (MSIX 打包)
安装路径 C:\Program
Files\WindowsApps\OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0\
系统区域 zh-CN
Culture zh-CN
UI Culture zh-CN
GeoID 251 (中国)
WinUILanguageOverride 未设置
------------------------------
诊断过程与结果1. 配置文件检查

C:\Users\Administrator\.codex\config.toml 中 localeOverride = "zh-CN" 已正确持久化:

toml

[desktop]
appearanceTheme = "system"
composerEnterBehavior = "cmdIfMultiline"
integratedTerminalShell = "commandPrompt"
conversationDetailMode = "STEPS_COMMANDS"
notifications-turn-mode = "unfocused"
localeOverride = "zh-CN"

  1. 语言资源检查

locales/ 目录中 zh-CN.pak 存在且大小正常:

zh-CN.pak 509,068 bytes
zh-CN_FEMININE.pak 18 bytes
zh-CN_MASCULINE.pak 18 bytes
zh-CN_NEUTER.pak 18 bytes
zh-TW.pak 503,643 bytes

  1. 启动日志分析

启动日志中仅见匿名 method=config/read 调用,没有任何 locale / i18n / lang
初始化记录。对比正常行为,Electron/Chromium
应用应在启动时记录语言设置和应用过程。

关键日志行(完整的 locale 相关搜索返回空结果):

[AppServerConnection] response_routed ... method=config/read ... errorCode=null

  1. Statsig 特征标志

搜索所有日志中的 Statsig 条目,仅有 browser_use_availability_resolved 被标记为
reason=statsig-disabled,未发现与语言/本地化相关的特征标志。

  1. 已尝试的修复手段(均无效)

尝试项 说明
config.toml [desktop] localeOverride 配置文件已正确存在,无效
localeOverride 移至顶层 移到根键下,无效
--lang=zh-CN 命令行参数 启动时传入,无效
清理 ~/.codex/cache/ 应用缓存,无效
清理 Electron Chromium 缓存 Cache, Code Cache, GPUCache, blob_storage, Local
Storage, Session Storage,无效
系统语言环境 系统全域 zh-CN,无效
------------------------------
根因分析

问题不在持久化层,而在运行时语言切换机制本身。

配置文件写入正常(localeOverride 持久化到 config.toml),但语言包从未被加载或应用。可能的根因:

  1. IPC 通道异常:MSIX 沙箱隔离可能导致 Chromium 'locale-changed' IPC 事件无法从主进程到达渲染进程。
  2. 主进程 locale 调用链缺失:app.getLocale() / app.setLocale()

或等效调用在打包版本中未正确编译或未在正确时机调用。

  1. 渲染进程 i18n provider 绑定固定值:前端 i18n 框架(如 react-intl /

i18next)可能初始化时绑定了 en-US 且未订阅语言变更事件。

  1. MSIX 打包差异:与标准 Electron 打包(如 electron-builder)不同,MSIX 打包可能导致

Electron 无法正确解析 app.getLocale() 的返回值或无法访问 locales/ 目录下的 .pak 文件。

------------------------------
建议修复方向

  • 在日志中增加 locale / i18n 初始化埋点,确认主进程是否正确读取了 config.toml 中的 localeOverride。
  • 检查 MSIX 打包下 locales/ 目录的访问权限和应用内 app.getLocale() 返回值。
  • 验证渲染进程 i18n provider 是否正确订阅了主进程 locale 变更事件。

Sheikh Mohammad Ali Maheer @.***> 于2026年5月28日周四 07:02写道:

maheerCodes left a comment (openai/codex#24827) <https://github.com/openai/codex/issues/24827#issuecomment-4559682401> Thanks for the detailed report. I was able to reproduce something similar on Windows where the language selector accepts the locale change, but the UI remains in English after restart. A few things that may help narrow this down for the Codex team: - The localeOverride = "zh-CN" entry appears to save correctly in: C:\Users\Administrator\.codex\config.toml . - Since the Chinese language resources already exist in the package, this may be related to: - locale initialization during startup. - cached renderer state. - or Windows-specific language fallback logic. You already tested most common fixes (reset app data, relogin, network reset), so this does look like an actual application-side bug rather than configuration error. Possible workaround to test: 1. Fully exit Codex from Task Manager. 2. Delete: - %APPDATA%\OpenAI Codex . - %LOCALAPPDATA%\OpenAI Codex . 3. Reboot Windows . 4. Launch Codex once in English. 5. Then switch to zh-CN before opening any workspace. It may also help developers if you attach: - config.toml . - startup logs after changing locale. - screenshot of Settings → Language. - Windows display language + region settings. The reason=statsig-disabled log line might also be relevant if localization rollout depends on feature flags. This looks like a valid Windows localization bug. — Reply to this email directly, view it on GitHub <https://github.com/openai/codex/issues/24827?email_source=notifications&email_token=BZCX4LJJ55VF4DIWT3IOJV34456YRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVHE3DQMRUGAY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4559682401>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BZCX4LJQ7BVNX45BTFWZTL34456YRAVCNFSM6AAAAACZP4IRBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKNJZGY4DENBQGE> . Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS <https://github.com/notifications/mobile/ios/BZCX4LKWDVSTD75XQHQ72ZD4456YRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVHE3DQMRUGAY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG> and Android <https://github.com/notifications/mobile/android/BZCX4LNIUU7CNPL6RMXDYPL4456YRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVHE3DQMRUGAY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>. Download it today! You are receiving this because you authored the thread.Message ID: @.***>
maheerCodes · 2 months ago

Thanks for investigating and confirming this issue.

I tested the behavior on Windows and can consistently reproduce it:

  • The language selector allows changing the language.
  • The setting appears to be saved successfully.
  • After restarting Codex Desktop, the UI remains in English.
  • Reinstalling the application and restarting Windows did not resolve the problem.

Additional observations:

  • The issue appears to be specific to the Windows desktop client.
  • Configuration persistence seems to work correctly.
  • The selected language is not fully applied during application startup.

Based on testing, this looks like a Windows localization initialization issue rather than a settings-saving problem.

Thank you for tracking the bug. I'm happy to help test future builds or provide additional diagnostics if needed.

zyjtest001git · 2 months ago

I also encountered the same problem on Windows.