Add RTL (Right-to-Left) Support and Improve Arabic Language Compatibility

Resolved 💬 4 comments Opened Nov 5, 2025 by zcodegenius Closed Jan 11, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Summary

Claude Code needs better support for Right-to-Left (RTL) languages,
particularly Arabic. Currently, the chat interface and text handling
are optimized for LTR (Left-to-Right) languages.

Problem

Users working with Arabic language face several issues:

  1. Chat interface does not properly reflect RTL text direction
  2. Text appears in incorrect orientation
  3. Poor visual alignment for Arabic characters and words
  4. User experience is compromised when switching between Arabic and English

Expected Behavior

  • Full RTL support in chat interface when Arabic is used
  • Proper text directionality detection based on language
  • Correct character rendering and spacing for Arabic
  • Seamless switching between LTR and RTL languages
  • Interface elements should adapt to text direction

Current Behavior

  • Chat interface remains LTR regardless of language input
  • Arabic text may display incorrectly
  • No automatic RTL detection or adaptation

Suggested Implementation

  • Detect language and apply appropriate text direction (dir="rtl")
  • Support bidirectional (bidi) text handling
  • Test with multiple Arabic dialects and character sets
  • Ensure accessibility standards for RTL layouts

Use Cases

  • Arabic-speaking developers using Claude Code
  • Teams working on Arabic projects or documentation
  • Multi-language projects requiring seamless code assistance

Additional Context

RTL support is essential for:

  • Arabic language
  • Hebrew language
  • Persian/Farsi language
  • Urdu language

Proposed Solution

Proposed Solution

1. Frontend Implementation

  • Add dir="rtl" attribute to chat container when Arabic is detected
  • Implement CSS logical properties (margin-inline, padding-inline) instead of left/right
  • Use CSS flexbox/grid with proper alignment for RTL
  • Add language detection using Accept-Language header or user settings

2. Text Direction Detection

  • Auto-detect language and apply appropriate direction:

Arabic, Hebrew, Persian, Urdu → RTL English, French, Spanish, etc. → LTR

  • Allow manual override in user settings

3. CSS Updates

  • Replace hardcoded left/right with logical CSS properties:
/* Before */
margin-left: 10px;  /* LTR only */

/* After */
margin-inline-start: 10px;  /* Works for both RTL and LTR */
Ensure icons and UI elements flip correctly in RTL mode
Test responsive design for RTL layouts
4. Typography & Font Support
Add support for Arabic fonts (e.g., Segoe UI, Arabic Typesetting)
Ensure proper character spacing and ligatures
Support for diacritical marks (tashkeel) in Arabic
5. Message Alignment
User messages: Right-aligned in RTL, left-aligned in LTR
Assistant messages: Left-aligned in RTL, right-aligned in LTR
Preserve code block formatting regardless of direction
6. Input Area
RTL text input field with correct cursor behavior
Support for mixed LTR/RTL text (bidirectional text handling)
Proper placeholder text direction
7. Testing Checklist
 Test with pure Arabic text
 Test with code snippets mixed with Arabic
 Test with mixed LTR/RTL paragraphs
 Test on mobile devices
 Test with screen readers (accessibility)
 Test with multiple Arabic dialects
 Performance testing with long Arabic messages
8. Accessibility
Ensure WCAG compliance for RTL layouts
Proper lang attribute in HTML
Screen reader compatibility for RTL content
Keyboard navigation support
9. Browser Compatibility
Test on: Chrome, Firefox, Safari, Edge
Ensure consistent rendering across browsers
Mobile browser support (iOS Safari, Chrome Mobile)
10. Documentation
Update docs to mention RTL support
Provide examples for Arabic language usage
Include accessibility guidelines for RTL

### Alternative Solutions

_No response_

### Priority

Critical - Blocking my work

### Feature Category

CLI commands and flags

### Use Case Example

_No response_

### Additional Context

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗