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 后,重启应用,界面仍为英文。

技术分析

  1. 中文翻译数据存在:app.asar 中共有 15,632 条唯一中文 UI 字符串
  2. localeOverride 配置被应用代码系统正确解析
  3. Electron app.getLocale() 返回 zh-CN
  4. ``根因``:Web UI(React/Vite)的 i18n 初始化代码将 locale 硬编码为 en-US,没有读取 localeOverride 配置

建议修复

Web UI 的 i18n 初始化处应将默认 locale 改为从以下渠道读取(按优先级):

  1. config.toml 中的 localeOverride 值
  2. Electron app.getLocale() 返回值
  3. navigator.language
  4. 回退到 en-US

View original on GitHub ↗

4 Comments

etraut-openai contributor · 2 months ago

English translation:

Overview

Codex Desktop cannot switch to the Chinese interface, even though the relevant configuration and translation data already exist.

Environment

  • App version: 26.608.12217 (0.138.0-alpha.7)
  • Electron/Chromium: 149.0.7827.54
  • Operating system: macOS (Apple Silicon)
  • macOS system language: zh_CN (zh-Hans-CN)

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

  1. Chinese translation data exists: app.asar contains 15,632 unique Chinese UI strings
  2. The localeOverride configuration is correctly parsed by the app’s code system
  3. Electron app.getLocale() returns zh-CN
  4. ``Root cause``: the Web UI (React/Vite) i18n initialization code hard-codes the locale to en-US and does not read the localeOverride configuration

Suggested fix

The Web UI’s i18n initialization should change the default locale to read from the following sources (in priority order):

  1. The localeOverride value in config.toml
  2. The value returned by Electron app.getLocale()
  3. navigator.language
  4. Fall back to en-US

<!-- codex-issue-translator -->

dplya515-stack · 2 months ago

same here on Windows

toohandsome · 2 months ago

+1

Kenny-Snub-Nose-Monk · 1 month ago

+1