Jump to content

Topic on Project:Support desk

How can I create both left-to-right and right-to-left pages in MediaWiki?

5
216.15.119.210 (talkcontribs)

(Apologies for what may be a simple question, but zillions of searches for "bidi" and "right-to-left languages" have just left me more confused than before.)

MediaWiki 1.21.1 PHP 5.3.24 (cgi-fcgi) MySQL 5.0.96-log http://horawiki.org/

I would like users of my wiki to be able to contribute pages in both LTR and RTL languages, specifically English and Hebrew. I seem to have the interface working correctly per-language (I'm using the Universal Language Selector extension) but things don't work in content pages. How do I tell MediaWiki that a content page is RTL rather than LTR?

For example, I have pages and which are more-or-less translations of each other. The latter page, however, displays generally as LTR---notice that everything is crammed against the left margin, not the right margin.

On the other hand, when I look at the page in the WikiEditor "Preview" tab (after edit and before publish) everything looks great. Indeed, I can (mostly) use directional markers amp-lrm-; and amp-rlm-; to get the punctuation correct. (Still struggling with references, but that might work too.) How come the previewer shows the page correctly, but in the wiki it still looks wrong?

From the documentation, it looks like I might need to set the "PageContentLanguage" or the like. But I can find only hooks and so forth to do this---how does a user set it for a page he is creating?

Any help greatly appreciated.

216.15.119.210 (talkcontribs)

Comment: The paragraph in my original post that starts "For example, I have pages..." continues with two example URLs. The first of these URLs ends with an exclamation point, which is not being rendered correctly here. It shows up after the external-link icon and isn't part of the URL. That seems to be a bug. I haven't seen it anywhere else and it's irrelevant to my current question. In any case, clicking that URL will take you to a nonexistent page unless you put the exclamation point back onto the end.

I hope the second URL works for you. It simply says "Welcome to HoraWiki" in Hebrew.

Ciencia Al Poder (talkcontribs)

I've fixed the link.

You may try Extension:PageLanguage.

Creating pages on a different text direction than the configured one is hard. You may be able to "partially" solve it wrapping all the contents inside <div dir="rtl"></div> and also inserting the RLO character (RIGHT-TO-LEFT OVERRIDE, U+202E) at the start of the code and the PDF character (POP DIREC‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬TIO‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬NAL FORMATTING, U+202C) at the end. Those characters are just for the textarea to display the text in the correct direction, since the t‬‬‬extarea doe‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬sn't pa‬‬‬‬‬‬‬‬‬r‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬se dir="rtl". Example (without those unicode characters that KDE doesn't allow me to easily insert here):

כדי למצוא אינפורמציה על ריקודים, יוצרים, ארועים ועוד, התחילו בתפריט הניווט הנמצא בצד ימין‏.

אחר ההרשמה, הגולשים מוזמנים לתרום לאתר, לערוך, להוסיף, לתקן, וליצור דפים על פי רצונם. בצד שמאל תחת "עזרה" נמצאים הקישורים הדרושים לכך‏.

יבואו הגולשים ללמוד ולהשתעשע. אין חשׁשׁ לקלקל דבר.

79.183.204.235 (talkcontribs)

thanks!! i was looking for an answer for like 19298129821 days but finaly got the answer!!!

79.183.204.235 (talkcontribs)

thanks i was looking for an answer for like 19298129821 days but finaly got the answer!!!

Reply to "How can I create both left-to-right and right-to-left pages in MediaWiki?"