Open GoogleCodeExporter opened 8 years ago
Oh, I've never thought about RTL languages and I have no idea how they work
programming-wise. Are you suggesting that it would work simply by making the
display-text and the input-box right-aligned when one is using an RTL language?
Any
idea how to detect such a language? Or would a simple check-box in preferences
be enough?
Original comment by tristesse
on 30 Dec 2008 at 8:41
Luckily we're not completely in the dark ages of RTL language support anymore.
It's
not as simple as right-adjusting the text because the punctuation is
interpreted as
LTR and gets put at the wrong end of the line (there are some other possible
problems, too, but I won't go into those here).
These days GTK and QT are capable of displaying RTL text. You would probably
need to
tell it to both right-align and set the text as RTL. I'm not a programmer
(nothing
above bash scripts sadly), but I've been digging around, and I've found what
looks to
be the information you would need about adding RTL support in QT on this site:
http://doc.trolltech.com/qtjambi-4.4/html/com/trolltech/qt/core/Qt.LayoutDirecti
on.html
The following 2 sites also had some information that looked useful in
trouble-shooting any problems with RTL input (they deal with QTextEdit, but I
think
the principles they are talking about are the same).
http://www.qtforum.org/article/26493/qtextedit-has-problem-with-combination-of-t
ext-direction-and-alignment.html
http://elcuco2.blogspot.com/2008/10/qtextedit-and-qtextcursor-fun.html
I haven't been able to come up with any information about auto-detecting
language,
although that last link I listed mentioned it in one of the comments, so there's
probably a way to do it. I know GTK apps these days (at least Gedit and GIMP)
seem to
figure out that you're typing Arabic and switch you to the right direction
immediately. I'm guessing QT has something similar built-in once I can find it.
I'll
keep working on that. As far as I'm concerned, a check-box would be good
enough, but
I suppose that's not the most elegant way to do things if there's a way to
auto-detect the language.
Original comment by stevebin...@gmail.com
on 31 Dec 2008 at 12:50
Original issue reported on code.google.com by
stevebin...@gmail.com
on 30 Dec 2008 at 6:23