I18N-007 critical Best Practices

RTL support if needed

RTL languages (Arabic, Hebrew, Farsi, Urdu) require mirrored layouts. CSS logical properties or RTL tooling needed for proper support.

Question to ask

"Flip to Arabic — does your layout mirror or break?"

Verification guide

Severity: Critical (if RTL languages supported), N/A otherwise

RTL (right-to-left) languages like Arabic, Hebrew, Farsi, and Urdu require mirrored layouts.

Check automatically:

# Check for RTL-related code
grep -riE "dir=.rtl|direction:\s*rtl|\[dir=.rtl\]|:dir\(rtl\)" src/ --include="*.tsx" --include="*.jsx" --include="*.css" --include="*.scss" 2>/dev/null | head -10

# Check for CSS logical properties (RTL-friendly)
grep -riE "margin-inline|padding-inline|inset-inline|border-inline|start|end" src/ --include="*.css" --include="*.scss" --include="*.tsx" 2>/dev/null | head -10

# Check for RTL libraries
grep -E "rtlcss|stylis-plugin-rtl|rtl-detect" package.json 2>/dev/null

# Check i18n config for RTL locales
grep -riE "ar|he|fa|ur" src/ --include="*i18n*" --include="*locale*" 2>/dev/null | head -5

# RED FLAG: Physical properties that break in RTL
grep -riE "margin-left|margin-right|padding-left|padding-right|text-align:\s*(left|right)" src/ --include="*.css" --include="*.scss" 2>/dev/null | head -10

Ask user:

  • "Are RTL languages in scope?" (Arabic, Hebrew, Farsi, Urdu)
  • "If yes, has the UI been tested in RTL mode?"

Pass criteria:

  • If RTL needed: CSS uses logical properties or RTL tooling
  • dir attribute set based on locale
  • Layout tested and works in RTL
  • If RTL not needed: N/A (document as intentional)

Fail criteria:

  • RTL language supported but layout broken
  • Heavy use of margin-left/padding-right without RTL override
  • Never tested with RTL locale

Evidence to capture:

  • RTL languages in scope (or not)
  • CSS approach (logical properties, RTL tooling)
  • Testing status

Section

42. Internationalization (i18n)

Team & Development