# "Change Text Direction" icon (Arabic and Hebrew forums)



## elroy

The "Change Text Direction" icon in the Arabic and Hebrew forums (see attached photo) doesn't seem to be working.

I _think_ this icon is supposed to do double duty by adding RTL tags and right-justifying the text.  It doesn't seem to be doing either.


----------



## mkellogg

I type a word, highlight it, press the button, choose Right to Left.  It wraps an [ RTLP ] tag around the word.  I click through to see the Preview and it is right-justified.

Like this.

I think the trick might be to type the text first, then press the button.  



> I _think_ this icon is supposed to do double duty by adding tags and right-justifying the text.


I'm not sure what tags it would add, but it does right-justify the text.


----------



## elroy

Hm, it seems to be working now!


----------



## elroy

I just tried it and it didn't work.

I typed out a post, part English part Arabic, and then I highlighted an Arabic portion and hit the button, and it didn't do anything.

It's the second line in the first post here: Jordanian Arabic: أهلا وسهلا بعقلي

I ended up having to manually right-justify the text and insert RTL tags.


----------



## cherine

Yes, the button doesn't work unfortunately, and I always have to click on the other icon of text direction and sometimes I have to manually add the RTLP tags.


----------



## elroy

Any chance of fixing this?  It would be really useful!


----------



## cherine

Today it worked fine with me (here). I didn't even highlight the text, just had the cursor on the line, clicked on the button and the tags where added and the text correctly moved from right to left.


----------



## 2PieRad

Was the button removed in the last forum upgrade? I don't see it any more. Come to think of it, the button often didn't work for me either. I usually just add the rtlp tags manually. (The regular "align right/left/centre" button doesn't properly align punctuation.)


----------



## mkellogg

I am pretty sure that I can get it added back. I think the answer is "no", but does "right align" in the alignment menu do what you need?

Also, was the button for the [ rtl ] or [ rtlp ] tag?


----------



## elroy

Right-align only aligns the text to the right.  We also need it to be coded as _right-to-left_.

Ideally we would have one button that does both.  [RIGHT] tags (or the "right align" button) do right-align, and [RTL] tags do right-to-left.  I believe [RTLP] tags, and the corresponding button, were _supposed_ to do both, but at least the button almost never worked.  I think the tags were more reliable, but I can't recall if they were consistently reliable.  And even if they were, we need this so often that it really would be very helpful to have a button rather than have to manually insert tags each time.


----------



## mkellogg

So:
 - One button that puts text in the middle of a sentence (inline text) in RTL.
 - One button that puts a paragraph in RTL and right-aligns the paragraph.

Right?  I think that is what the RTL and RTLP buttons were supposed to do.

Can you create or show me an example of the tags not working correctly?


----------



## elroy

mkellogg said:


> - One button that puts text in the middle of a sentence (inline text) in RTL.


 This isn't really necessary, but it wouldn't hurt to have it.  The only time in-line text acts up is if it has punctuation or numbers, which is relatively rare.  If it consists of letters only, it's automatically formatted correctly.  For the rare cases in which it isn't, I wouldn't mind using manual RTL tags.  That's what we do for LTR.


mkellogg said:


> - One button that puts a paragraph in RTL and right-aligns the paragraph.


 This is what we really need!

I'll test tags in a subsequent post.


----------



## elroy

Testing RTL:


قَالَ ٱبْنُ إِسْحَاقَ:


----------



## elroy

Testing RTLP:


قَالَ ٱبْنُ إِسْحَاقَ:


----------



## elroy

Based on my tests above, both tags seem to be working.

RTL does right-to-left, and RTLP does that and right-align.


----------



## marrish

IIR forum needs 


mkellogg said:


> - One button that puts a paragraph in RTL and right-aligns the paragraph.


IIR Languagues forum needs it too, when it's ready (there used to be one).


----------



## mkellogg

I see there are some advances in HTML that might help us here. Elias, can you please post a message without the RTL tags that is messed up, and maybe explain to me what the problem is. I will then see if the new attributes fix things.


----------



## elroy

ذهبت إلى المعرض ورأيت لافتة مكتوب عليها بالإنجليزية do not enter فتعجبت وتسألت لماذا، ثم أجابني أحدهم ولم أقتنع بإجابته.

The sentence starts with the part in blue, then comes the English phrase, then the part in red.

Right now we have

blue - English - red - period

but it should be:

period - red - English - blue

The sentence should look like this:

ذهبت إلى المعرض ورأيت لافتة مكتوب عليها بالإنجليزية do not enter فتعجبت وتسألت لماذا، ثم أجابني أحدهم ولم أقتنع بإجابته.

Above, I added rtl tags.

The sentence is still aligned to the left.  But that's not such a big deal and can easily be fixed by pushing the available button.  Or we could use RLTP tags:

ذهبت إلى المعرض ورأيت لافتة مكتوب عليها بالإنجليزية do not enter فتعجبت وتسألت لماذا، ثم أجابني أحدهم ولم أقتنع بإجابته.


----------



## marrish

marrish said:


> IIR forum needs
> IIR Languagues forum needs it too, when it's ready (there used to be one).


Can this button be added, please? I can see this has been introduced in the Arabic and Hebrew forum. Thanks a lot.


----------



## cherine

Hello Mike,

I agree with Marrish. The IIR forum needs the same tag, for texts written in Urdu and Persian.

Thank you.


----------



## mkellogg

cherine said:


> The IIR forum needs the same tag, for texts written in Urdu and Persian.


Sure. I've set it up. Let me know if there are any problems.


----------

