# RTL tags?!



## amikama

It's well-known that writing posts in Hebrew (and Arabic too) can sometimes be nightmare. Now that we have Hebrew and Arabic forums, I did a little research hoping to find a magic solution to this problem.

I'm far away from being HTML master, but if I don't mistake, tags like <p dir=rtl></p> solve the bidirectional problem and display the right-to-left text (Hebrew and Arabic) properly (aligning to the right, punctuation marks placed correctly, etc.).
Now, I found out that admins can create custom BB codes. So if those HTML tags were implemented as BB codes (let's say, ), then the life of the forer@s who speak/learn RTL-ish would be much easier... no?


----------



## mkellogg

Don't they already work that way?  I was under the impression that there wasn't any problem, and therefore, there is no need for special tags like that.

Mike


----------



## amikama

mkellogg said:
			
		

> Don't they already work that way? I was under the impression that there wasn't any problem, and therefore, there is no need for special tags like that.
> 
> Mike


No, they don't.

האם סימן השאלה מופיע בסוף המשפט?
The question mark should be at the left, not at the right.

המשפט הירוק צריך להיות בצד ימין abc המשפט הכחול צריך להיות בצד שמאל
The green sentence should be at the right and the blue one at the left (they are misplaced because of the Latin characters).

And other problems related to text direction. Aligning it to the right won't work. I tried this in a HTML editor with dir=rtl property and it did work.

In fact, I saw that similar question was asked in the vBulletin Community Forum (regarding Arabic), and the answer was to use custom BBcode to solve it.


----------



## Jana337

I am not an expert - I hope someone can describe the problems better, but from my experience, the output differs depending on whether I compose Arabic messages directly in the vB window, copy them from Wikipedia (or elsewhere for that matter) or from Word.

The following sentences were composed here (question marks OK, period not):
                                                 هل كتبت هذا الكتاب؟

هل هي فهمت؟

إسمي ينا.


This is copied from Wiki - the last period misplaced:
*مصر* هي دولة تقع في شمال أفريقيا مطلة على الشاطئ الجنوبي الشرقي للبحر الأبيض المتوسط و الشاطئ الشمالي الغربي للبحر الأحمر. يحدها من الغرب ليبيا، من الجنوب السودان، من الشمال الشرقي فلسطين و إسرائيل. يفصلها البحر الأحمر عن كل من الأردن و السعودية. تمر قناة السويس فيها، اللتي تفصل قارتي آسيا و أفريقيا. مصر هي أكبر دولة عربية سكاناً، كما أن عاصمتها القاهرة تحتضن مقر جامعة الدول العربية.​ 
Word usually performs the worst.

Jana


----------



## mkellogg

Alright, I created an [ rtl ] tag as suggested.  It was easy enough.  Let me know if it works or not.  Sorry, no button for now.


----------



## amikama

mkellogg said:
			
		

> Alright, I created an [ rtl ] tag as suggested. It was easy enough. Let me know if it works or not. Sorry, no button for now.


OK, let's test it:

האם סימן השאלה מופיע בסוף השאלה?

האם המשפט הירוק djfos מופיע לפני המשפט הכחול?

"זה נראה נחמד מאוד," אמרה אליס כשסיימה לקרוא אותו, "אבל *די קשה* להבנה!" (אתם מבינים, היא לא רצתה להודות, אפילו בפני עצמה, שאינה מבינה אותו בכלל.) "איכשהו נדמה שהוא ממלא לי את הראש ברעיונות - רק שאני לא בדיוק יודעת מהם!"
(לואיס קרול, "מבעד למראה ומה אליס מצאה שם", תרגום: רנה ליטווין) 
Yes, it seems to work now. Thanks!


----------



## elroy

amikama said:
			
		

> OK, let's test it:
> 
> האם סימן השאלה מופיע בסוף השאלה?
> 
> האם המשפט הירוק djfos מופיע לפני המשפט הכחול?
> 
> "זה נראה נחמד מאוד," אמרה אליס כשסיימה לקרוא אותו, "אבל *די קשה* להבנה!" (אתם מבינים, היא לא רצתה להודות, אפילו בפני עצמה, שאינה מבינה אותו בכלל.) "איכשהו נדמה שהוא ממלא לי את הראש ברעיונות - רק שאני לא בדיוק יודעת מהם!"
> (לואיס קרול, "מבעד למראה ומה אליס מצאה שם", תרגום: רנה ליטווין)
> Yes, it seems to work now. Thanks!


 
Really?!  

So all I have to do is use the rtl tag and I won't have to worry about formatting problems?  Does that mean all the trouble we went through with the Hebrew sticky could have been avoided by typing a few keystrokes?


----------



## mkellogg

Glad to help


----------



## JLanguage

mkellogg said:
			
		

> Alright, I created an [ rtl ] tag as suggested. It was easy enough. Let me know if it works or not. Sorry, no button for now.


 
Hurray! What next? A free Hebrew-Hebrew dictionary?  

Formatting is no longer a homicidal-mood-inducing activity!

-Jonathan.


----------

