RTL support
Desired Feature: RTL support for both the text editor and the application as a whole.
--
hello, I'm currently working on translating the application into Arabic, but the issue I'm facing is RTL support. specifically in the text editor itself. when writing in arabic (or any rtl language), a number of problems occur:
- bullet points like these are placed at the end of the sentence instead of at the beginning (they're always on the left side).
- when writing a word in a LTR language like english in the middle of the sentence, the whole sentence gets split into two segments in backwards order. making the sentence unreadable or very hard to read at best. especially when using more than one word.
- punctuation marks are placed in the wrong side when used at the end of a sentence.
this is the biggest issue in RTL support. not only in BookStack, but in any other application out there. I'd like for the entire app to support RTL, but for now, the text editor is the highest priority. if not fixed then the app is unusable for any RTL language.
I'd like to contribute in making the RTL support but I lack the ability to do so. if there are any resources offering guides for adding RTL support then please mention them. also if anyone has the experience to do this then it would be greatly appreciated.
Thanks for opening this @kmoj86.
I've now made some updates that will be in the next release to assist with RTL support and to accompany your Arabic pull request. The updates I've made can be seen here: https://github.com/BookStackApp/BookStack/commit/1cb6ae39c8a6eedad457a37ce406c8c0a700bc80
This brings some basic RTL support groundwork and features.
The main WYSIWYG editor will now have its direction set depending on the direction of your language.
If your language is rtl then you'll also get some extra toolbar buttons to control text direction.
The page content text direction should display correctly depending on the contents. I've made some updates to the bullet point styles to ensure they're rtl-compatible.
This should now mean basic RTL support is now included so I will now close this request. There's definitely going to be further issues but for those it's probably best if they are raised as their own, focused, issue.
Hi
Some other languages are rtl.
Please add all of them:
rtl languages
@ali-dashti Our language list contains languages that BookStack has been translated for. We don't simply list every language possible.
Now persian language (fa) is in language list but it's not rtl.
Maybe rtlLocales should read from .env variable.
If this is true, I'm eager to do that and create new issue
@ali-dashti Persian was not fully added due to being mostly incomplete since being open for translation, but I can see it had significant contributions early this year so I've opened #3426 to make the language available in the next release.
I wouldn't be looking to make rtlLocales configurable from the .env file without a significant reason to do so.