Skip to content

Conversation

@Yazeedx0
Copy link

@Yazeedx0 Yazeedx0 commented Oct 7, 2025

Add comprehensive RTL support and internationalization features

Implemented RTL language detection and text direction functions in chatkit/i18n.py.

Added utility functions for handling mixed-direction text and Arabic number formatting.

Created detailed documentation for RTL support in docs/i18n.md, including usage examples and best practices.

Developed an example script examples/rtl_support_example.py demonstrating various RTL features and widgets.

Added unit tests for RTL functionality in tests/test_i18n.py, covering language detection, character detection, and widget support.

Enhanced existing widgets to support RTL text direction and language attributes.

Yazeedx0 and others added 3 commits October 7, 2025 11:16
- Implemented RTL language detection and text direction functions in `chatkit/i18n.py`.
- Added utility functions for handling mixed-direction text and Arabic number formatting.
- Created detailed documentation for RTL support in `docs/i18n.md`, including usage examples and best practices.
- Developed an example script `examples/rtl_support_example.py` demonstrating various RTL features and widgets.
- Added unit tests for RTL functionality in `tests/test_i18n.py`, covering language detection, character detection, and widget support.
- Enhanced existing widgets to support RTL text direction and language attributes.
@weedon-openai
Copy link
Contributor

Hi @Yazeedx0, RTL is on our roadmap, but we need to implement it client side in the ChatKit web component before we do anything else. Ideally, we'll set dir="rtl" at the root of ChatKit when we detect a RTL locale. Then you should only need to use RLM/LRM to cover edge cases in your own strings for widgets etc.

Regardless, I don't think we want this complexity to live in the server SDK, again you could wrap strings in your own intl layer before passing them to widgets, but even then, it's a stop gap until we can ship proper support for RTL in ChatKit.

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.

2 participants