zai-org / zai-org/feedback

[建议 / Feature] Feature Request: Add RTL (Right-to-Left) text direction support for Persian, Arabic, and Hebrew languages

Open
#273 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2 status: 待评估 type: 功能建议
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

提交前确认 · Pre-submission checklist
  • 我已搜索过现有 issue,确认这不是重复提议 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category

UI / 界面体验 · UI / UX

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

使用场景 · Use case

ZCode's chat interface renders all text left-to-right (LTR).
Users who communicate in Persian, Arabic, or Hebrew see their
messages displayed left-aligned, which significantly reduces
readability and creates an unnatural reading experience.
This affects not just casual conversation, but also code reviews,
technical discussions, and any workflow where non-Latin script users
interact with the AI agent in their native language.

建议方案 · Proposal

Several possible approaches (in order of preference):

Option A: Automatic bidirectional text detection (Recommended)

Detect the primary writing direction of each message using the
Unicode Bidirectional Algorithm (UAX #9). Most modern UI frameworks
and browsers support this natively. Messages containing primarily
RTL characters would automatically render right-aligned, while LTR
messages remain unchanged. No user configuration needed.

Option B: Add RTL/LTR toggle in Settings

Add a user preference (e.g., textDirection: "auto" | "ltr" | "rtl")
in the Settings panel. This gives users explicit control over text
alignment.

预期价值 · Expected value

Expand the existing locale system (currently supports en-US, en-GB,
zh-CN, zh-TW, ko-KR) to include RTL languages. When an RTL locale
is selected, the interface text direction switches automatically.

  • Persian (Farsi): ~130 million speakers worldwide
  • Arabic: ~400 million speakers worldwide
  • Hebrew: ~9 million speakers worldwide

Supporting RTL text direction would make ZCode accessible to
hundreds of millions of additional developers, particularly in
the Middle East, Central Asia, and North Africa — growing markets
with active developer communities.

你认为的优先级 · Your perceived priority

None

你使用的 ZCode 版本 / 环境 · ZCode version / environment
  • ZCode Desktop on Windows 10 - Model: GLM-5.3 (builtin)
补充材料 · Additional context
  • Currently, the only workaround is to manually justify text in
    code blocks or tables, which is impractical for natural language.
  • ZCode is built on Electron (Chromium), which has excellent
    built-in bidirectional text support. Implementation should be
    straightforward.
  • A similar localization request exists for Russian (#13),
    indicating community demand for multi-language support.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Electron chat interface, locale system, and Settings panel. Compare automatic Unicode Bidirectional Algorithm detection with the proposed textDirection setting, then test Persian, Arabic, and Hebrew messages alongside the existing locales. Done means RTL content is readable without disrupting LTR messages, code reviews, or code blocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron
Domain
accessibility, frontend, internationalization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.