Implement Automatic Right-To-Left (RTL)
Most popular text editors change the text direction automatically to RTL (Rgiht to Left) when you enter a text in RTL languages such as Persian, Arabic or Hebrew. If that was the case in the Mattermost, we (the RTL language speaking people!) could use Mattermost much more productively, and localization to Farsi, Arabic, etc was possible.
-
Mohsen Khahani commented
Mattermost Boards does not support this yet. It's a simple fix: `dir="auto"`.
-
Anonymous commented
As far as I can see, mattermost 5.38.1 does use dir=auto for text areas, so RTL text looks OK. However, For whatever reason, `text-align: left` is applied to all text areas, so RTL text also is left aligned. I don't know why this is the case, but it'd be great if there is no alignment (or text-align: inherit is used) so that the browser uses proper alignment for RTL text automatically.
I see `text-align: left` is applied to `.form-control` and `.post-message__text` CSS classes, which is causing the issue. If they are changed to `inherit`, everything looks fine.
Thanks
-
Mohammad Javad Naderi commented
We wrote a plugin to add RTL support to Mattermost and apply some UI customizations to better display RTL text.
-
Ahmad Haghighi commented
-
Hedayat Vatankhah commented
All which needs to be done is to set dir="auto" for <p> tags showing user text and also for text input textarea. Browsers will/should automatically adjust the direction.
-
Hadi Farnoud commented
I wrote something to help: https://codepen.io/hadifarnoud/full/rmdxWe/