-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
Description
Hello Chainlit Team,
I have been using Chainlit for a project and I noticed that while automatic language detection is supported, Arabic (ar-SA) is currently missing.
I would like to propose adding native support for Arabic. Since this involves both translation and Right-to-Left (RTL) layout handling, here is how I suggest implementing it:
- Localization (Translation)
I can contribute the ar-SA.json file in the translations directory, covering all UI keys (Settings, API Keys, Chat Input, etc.). - RTL Support (The Critical Part)
Since Arabic is an RTL language, simply translating the text isn't enough; the layout needs to flip.
• Detection: The app should detect when ar-SA is the active locale.
• Implementation: We can dynamically apply dir="rtl" to the root element or the MUI theme when Arabic is detected.
• CSS/MUI: Ensure that margins/paddings use logical properties (e.g., margin-inline-start instead of margin-left) or let the MUI rtl plugin handle the flip.
Why this matters:
This would greatly improve accessibility for Arabic-speaking users and open Chainlit to a large demographic in the MENA region.
I am willing to open a Pull Request for the translation file. Could you provide guidance on where the RTL logic hooks are currently located in the codebase?
Best regards,
bigdizaya
Reactions are currently unavailable