janhq / jan

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer. Multiple engine support (llama.cpp, TensorRT-LLM)
https://jan.ai/
GNU Affero General Public License v3.0
20.78k stars 1.19k forks source link

feat: RTL (right-to-left) automatic detection for setting text direction #3020

Open Yasand123 opened 3 weeks ago

Yasand123 commented 3 weeks ago

Problem Both LTR and RTL writing systems in Jan are left to right. This is good for LTR languages such as English, but not for RTL languages such as Arabic.

Success Criteria It would be nice to automatically set text direction based on the character set used. If the first character in a message is detected to be Arabic for example, that message will have RTL text direction. This should be per text field (message, input prompt, instructions, etc).

Note there's a difference between text alignment, and text direction. Simple text alignment will not work properly.

Thank you.

imtuyethan commented 5 days ago

Wow this is such a nice suggestion, thanks for raising this!