Skip to content

feat(i18n): add Arabic locale and right-to-left layout support#373

Open
techAlhaji wants to merge 3 commits into
tributary-protocol:mainfrom
techAlhaji:feat/i18n-ar-rtl-support
Open

feat(i18n): add Arabic locale and right-to-left layout support#373
techAlhaji wants to merge 3 commits into
tributary-protocol:mainfrom
techAlhaji:feat/i18n-ar-rtl-support

Conversation

@techAlhaji

Copy link
Copy Markdown

Summary

Closes #119

Adds Arabic (ar) localization and full right-to-left (RTL) layout support across the application.

This PR introduces Arabic translations, mirrors the UI when the active locale is RTL, and adds automated tests to ensure correct localization and layout behavior.


What Changed

🌍 Arabic Locale

Added a new ar locale containing translations for application strings.

The locale integrates with the existing internationalization (i18n) framework and can be selected like other supported languages.


↔ Right-to-Left (RTL) Support

Implemented RTL-aware rendering for Arabic by:

  • Setting the document direction (dir="rtl") when the active locale is Arabic
  • Mirroring layouts where appropriate
  • Ensuring text alignment and spacing follow RTL conventions
  • Preserving LTR behavior for all existing locales

🧪 Automated Tests

Added tests covering:

  • Arabic locale loading
  • Correct translation rendering
  • RTL direction applied for Arabic
  • Layout mirrors correctly when dir="rtl"
  • Existing LTR locales remain unchanged

📚 Documentation

Updated the relevant documentation to include:

  • Arabic locale support
  • RTL behavior
  • Adding future translations
  • Testing guidance for localization changes

Benefits

  • Adds Arabic language support
  • Improves accessibility for RTL users
  • Provides a scalable foundation for additional RTL languages
  • Prevents regressions with automated localization tests
  • Keeps existing LTR layouts unaffected

Testing

Executed:

Rust

cargo fmt

cargo clippy --all-targets -- -D warnings

cargo test

JavaScript / SDK / App

npm run build

Verified:

  • Arabic translations render correctly
  • RTL layout is applied for the ar locale
  • LTR layouts remain unchanged
  • All existing tests continue to pass

Checklist

  • Added Arabic (ar) locale
  • Implemented RTL layout handling
  • Added automated tests for localization and RTL behavior
  • Updated relevant documentation
  • cargo fmt passes
  • cargo clippy --all-targets -- -D warnings passes
  • cargo test passes
  • npm run build passes
  • CI passes

@techAlhaji
techAlhaji requested a review from Spagero763 as a code owner July 23, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Arabic (ar) translation with RTL support

1 participant