I don't know whether this is already a feature on forem's roadmap, I tried searching and didn't find any posts mentioning RTL.
This issue on GitHub describes the problem briefly. I tried to come up with solutions. Those include:
dir=autoon user-generated content HTML, leaving the whole rendering and processing to the browser. Per the WHATWG HTML Spec, elements by default have
dir=autowill let the browser determine the directionality of an element based on the first character with a strong directionality in that element. This would require no styling changes AFAICT.
- Adding a boolean where the author specifies the default direction of their article.
- Using liquid tags to specify
ltrtext, defaulting to
- Allowing HTML rendering in addition to Markdown and Liquid. This is probably too much.
- Parsing the content on the server and determining the directionality of each element.
Top comments (4)
We have opened a discussion for this feature request in our Github Discussions . If you have any more suggestions or comments for the feature please add them to the new discussion.
+1 for this request. As DEV's community manager, I field a lot of support requests that come in via email. This is pretty highly requested and would be great to offer!
I'm completely willing and open to contributing/working on this feature. The way I see it is that Forem could start with just posts RTL support, so the layout and the website language remains in English, but posts written in RTL languages would display properly. Been hoping for it for quite some time now.
I really appreciate you offering to help here, but unfortunately we don’t have this work scoped for contributors to pick up and have no immediate plans to focus on i18n. While we're considering adding i18n features like RTL in the future, our current focus is on opening up FOSS installations for Forem. Once we’ve done this, we can reassess what features we’re able to offer next!
I really do think this would be a very valuable addition and when the time comes to figure out what we can do next, I’ll be happy to advocate for RTL support + other improvement to i18n features.