Skip to content

Bug: Codex cannot switch to the Chinese interface (localeOverride does not take effect) #27411

Open

Description

@xiaobai1690281

概述

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

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    configIssues involving config.toml, config keys, config merging, or config updates
    on Jun 10, 2026
  2. changed the title [-]Bug: Codex 中文界面无法切换(localeOverride 不生效)[/-] [+]Bug: Codex cannot switch to the Chinese interface (localeOverride does not take effect)[/+] on Jun 12, 2026
  3. etraut-openai commented on Jun 12, 2026

    @etraut-openai
    Contributor

    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
  4. dplya515-stack commented on Jun 14, 2026

    @dplya515-stack

    same here on Windows

  5. toohandsome commented on Jun 18, 2026

    @toohandsome

    +1

  6. Kenny-Snub-Nose-Monk commented on Jul 15, 2026

    @Kenny-Snub-Nose-Monk

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingconfigIssues involving config.toml, config keys, config merging, or config updates

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions