RTL languages

Hi, this forum (FLUX BB) doesn’t support RTL languages. If there’s an LTR word in the middle of an RTL language, the whole paragraph will get messed up and reversed. Is there any solution for this issue?
I know there are back end solution for this like changing CSS file or other thing but they will apply to whole forum not just to Iran sub from. There should be an Plugin or something to replace this editor that I’m currently writing on it and support RTL.

its very disappointing that nobody replied to this topic. earlier @kocio told me @Hakuch is the right person to talk about this issue on forum (FluxBB). i think i know a solution for this and i like to talk to an technical forum administrator/manager. please some one in charge about this kind of stuff reply. we could have a workaround for this issue using BBCodes. we should have bbcode like [rtl]text[/rtl] which will apply some CSS stuff on text. there is a FluxBB mode that make this possible, here it is :
or there should be other ways to add custom bbcode…
the HTML would be something like this for [RTL]{user text here}[/RTL]:

 <p dir="RTL">{user text here}</p>

the BBCode used in RTL (Align Right) will end up with the following HTML/CSS class:

<div class="bbc_right">{user text here}</div>
div.bbc_right {
	display: block;
	text-align: right;
	direction: rtl;

please advice.
regards , Navid from Iran sub forum.

I have installed FluxBB on my PC and i successfully managed to add a new bbcode to use it as a workaround for RTL issue in this forum. we need to find the OSM forum admin (which has access to editing php files on host like from FTP) to apply this fix. here is what i have done.
open \include\parser.php using notepad++ and add a new bbcode "rtl’ tag to the $tags = array() for example :

$tags = array('quote', 'code', 'b', 'i', 'u', 's', 'ins', 'del', 'em', 'color', 'colour', 'url', 'email', 'img', 'list', '*', 'h', 'topic', 'post', 'forum', 'user', 'rtl');

(in notepad++ search for $tags = array( to find the mentioned line above.)
now search for this line $pattern = '%\


and after that line add this :

$pattern[] = '%\[rtl\](.*?)\[/rtl\]%ms';

again search for this line $replace = ‘


and after that line add this :

$replace[] = '<p dir="RTL" align="right">$1</p>';

that’s it, save this file and upload it. now we can use [rtl]text[/rtl] bbcode tag.
please take look at this screenshot demonstrating post preview after applying this fix :

and a screenshot after submitting the post:

here is my parser.php file but its based on FluxBB version 1.5.11:

the text you are seeing in screenshots:

please be in contact with me.
regards, Navid.

The code for the forum is open and maintained on github: https://github.com/openstreetmap/openstreetmap-forum

Thank you @Zverik, i have made a Commit and a Pull Request.
i hope this get approved soon and we see the fix here on forum. not sure how long this will it take.
ps: it was my first git and GitHub work :slight_smile:

hello. just to update this topic , we (Mr Ahangarha and me and guys on github) decided to to take technically different approach to fix RTL issue.

  1. mr ahagarha provided better technical fix in my PR comments.
  2. if you read comments in my PR we decided to patch RTL bidi support in FluxBB main repository and after that we hope OSM Forum merge changes from its upstream the FluxBB. so here is the Mr Ahangarha Pull Request in FluxBB main repository in git hub :
    lets hope they will merge this PR and osm forum receive the fixes from its upstream.