Native RTL support for Persian/Arabic text in chat

Open 💬 0 comments Opened Jul 6, 2026 by mirbashiri

Feature request

Add native RTL (right-to-left) rendering for Persian/Arabic text in the chat interface, so mixed-language conversations (Persian + English/code) read naturally without relying on third-party browser extensions.

Context

Users writing in Persian (or other RTL languages) currently see their own messages and Claude's Persian responses rendered left-to-right, which makes longer paragraphs hard to read naturally. Mixed content (Persian prose + English technical terms + code blocks) needs per-paragraph direction detection, not a blanket page-wide flip.

Suggested behavior

  • Auto-detect text direction per paragraph/block (similar to CSS unicode-bidi: plaintext behavior) — Persian/Arabic paragraphs render RTL, English/code blocks stay LTR, within the same message.
  • Code blocks (<pre>/<code>) should always stay LTR regardless of surrounding text direction.
  • This should NOT flip the overall UI layout (sidebar, buttons, etc.) — only the message content itself.

Current workaround

Users can achieve this today with a custom Stylus userstyle:

.font-user-message, [data-testid="user-message"], .prose {
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}
code, pre {
  direction: ltr;
  text-align: left;
  unicode-bidi: embed;
}

This works but is fragile — claude.ai's selectors change periodically, breaking the userstyle. Native support would remove the need for this entirely.

View original on GitHub ↗