[建议 / Feature] Feature Request: Add RTL (Right-to-Left) text direction support for Persian, Arabic, and Hebrew languages
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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