• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: VWR-112
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Rob Linden
Votes: 17
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
1. Second Life Viewer - VWR

Arabic language needs to be displayed right to left rather than left to right

Created: 08/Feb/07 02:20 PM   Updated: 18/Nov/08 11:07 AM
Return to search
Component/s: Chat/IM, Internationalization
Affects Version/s: Source code
Fix Version/s: None

File Attachments: None
Image Attachments:

1. SLArabicBug.jpg
(246 kB)
Issue Links:
Duplicate
 
Relates
 

Linden Lab Issue ID: DEV-3826


 Description  « Hide
See image. This was sent in by Yossarian Seattle. Need to either trigger right-to-left behavior on language preference or perhaps just on font.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Rob Linden added a comment - 08/Feb/07 02:23 PM
Filing this in the external tracker since we probably won't get to this right away, and we're guessing that this would be a fairly easy fix for a developer who is literate in Arabic or any developer literate in a language that uses right-to-left text.

Peekay Semyorka added a comment - 09/Feb/07 07:57 PM
Words from different languages could be mixed into a single chat or IM sentence (all using the same font), so directionality shouldn't be inferred from the language preference or by the font used.

In Unicode, there are some specific directionality rules which need to be followed (i.e., some characters are strongly or weakly directional, there are nesting levels, etc.) For more info, see the Bidirectional Algorithm: http://unicode.org/reports/tr9/


Tammy Nowotny added a comment - 05/Mar/07 05:04 PM
It gets tricky because some languages use more than one writing system... like Japanese for example uses Chinese(-inspired) ideograms, a Japanese syllabic script AND "Roman-ji" (i.e., the Roman alphabet.) Roman-ji runs from left to right (no surprise!)... but the rest of the writing goes from right to left.

We eevn see thatin the screenshot: The word "YOU:" is written from left in right in Roman characters, as is the avi's nametag--- but the rest of the writing is in Arabic characters, which are supposed to go right to left. And ideally., you wd want the colon to be to the left of the word "YOU" but you don't "YOU" to be spelt "UOY"


Alissa Sabre added a comment - 14/Mar/07 09:36 AM
Rob,

I'm so sorry to say this, but your comment on 08/Feb/07 unveils that you don't know the nature of Unicode... If you have read any of the primer's text books on Unicode, you should not have said so. The Unicode bidi algorithm specification noted by Peekay Semyorka is the essential reading, but I'd like to suggest you to start from some books intended for novices. For example, "Unicode Primer" by Tony Graham and "Unicode Demystified" by Richard Gillam are very good introductory readings. You, or somebody in Linden lab responsible for Viewer internationalization should read one, if not yet done so.

The following is the brief scenario to support Arabic text:

(a) You need to have some bidi attribute table for Unicode characters. You can grab unicode character database available on the Unicode website and covert it into any favorite format.

(b) You need to implement some bidi algorithm. I guess you need to do so in several classes resides in linden/indra/llui, e.g., LLLineEditor, LLTextEditor, LLTextBox, etc. The job needed depends on whether you accepts the suggestion (c) below; if you do, you don't need to implement all the bidi features here, since FreeType does some part of the algorithm for you.

(c) You need to rework on font module in the viewer. I guess the change is tough. The current font module maps each Unicode character code into a rectangular bitmap image, caches the images in a big image surface, and draw font images on the OpenGL surface one-character-by-one. However, to handle Arabic character's cursive property, you need to pass Unicode codes to underlying TrueType rasterizer (FreeType, in this case) as a string (at least word-by-word). word-by-word processing is needed also for handling combining characters, that are essential to write Arabic text.

I really want to see the fully internationalized SL viewer to run, but I know it takes some time to implement all required features...

P.S., I will file several I18N bug reports soon, probably this weekend, so that the interested developper recognizes the issue. I'm willing to tackle them all, but it is clearly the job far more than one person's. Also, in my personal interests, full support of Japanese text has the #1 priority, Chinese and Korean come next...


CrystalShard Foo added a comment - 12/Jul/07 11:10 AM
When and If you get around to implementing this feature... dont forget to make it work on Hebrew too, please. I and many other Israelis have been asking for this feature for years now.

We cant speak in our native tongue in SecondLife despite having the fonts.


Alissa Sabre added a comment - 13/Jul/07 08:26 AM
I've been thinking how we can support world-wide scripts/languages in SL.

Note that, simply arranging characters from right to left is not enough to support Arabic, since Arabic characters change their shape depending on the positions in a word.

My best bet, at this moment, is to use pango, or something similar to it, to render the text paragraph-by-paragraph, as opposed to the current character-by-character rendering through direct use of FreeType. (This is still an idea. I've not yet started implementation.)



Alissa Sabre added a comment - 18/Jan/08 10:17 PM
Just for those who may concern,

This is a screen shot of my experimental pango-based-viewer.

http://alissa-sabre.cocolog-nifty.com/.shared/image.html?/photos/uncategorized/2007/12/12/multilanguage.jpg

No, it is not working yet. The cursor movement on notecard editor, for example, is just broken and totally unusable. I guess I need months...


schmilsson nilsson added a comment - 04/Oct/08 12:42 PM
I've posted a new entry at EurekaDejavu.com to try and raise the priority of this issue. The fact is, Second Life is now accommodating just about every major language group except for Arabic. We are doing a major report on Islamic cultures in Second Life at DancingInkProductions.com and most if not all the people we're working with are native Arabic speakers who are residents of Second Life. More on this at my blog post: http://eurekadejavu.blogspot.com/2008/10/when-will-second-life-include-arabic.html

This fix is long overdue. Please make it a priority.

Thanks in advance!


Breathe Swindlehurst added a comment - 06/Oct/08 09:27 AM
I join my voice with all the people here.

I urge LL to take a serious look at how they can implement Arabic language inside SL.

If they manage to get this done, it will then be a piece of cake to also implement Hebrew language, which is also right-to-left and thus is not displayed correctly.

If SL is to be a platform for public diplomacy, as it should be, then people should be allowed to express themselves. And there is no better way to express oneself than in their own mother language.

The Arabic-speaking world inside SL desperately needs Arabic support in the viewers and I think this issue cannot be delayed any further now.

Best,
Breathe - Virtual Hajj sim