![]() |
| ||
Classes - Annotated - Tree - Functions - Home - Structure |
Even though Qt tries to remove most of the burden of enabling applications for Arabic and Hebrew from the programmer, there are a few aspects where the programmer has to take care. This document will try to describe most of the problems that can occur when trying to translate and use the application in Arabic or Hebrew.
Arabic and Hebrew are different from most other languages in that they are written from right to left. Numbers and English words embedded in an Arabic or Hebrew sentence however are still written left to right. Text is stored on disk in the logical order, so displaying and editing has to use an algorithm to reorder the string into the visual order the user expects.
A simple example is the following string (capital letters signify Arabic or Hebrew):
THIS IS AN english WORD.
The visual output of this would be:
.DROW english NA SI SIHT
Qt takes care of all these formatting and reordering issues internally, so you don't have to worry about it.
Many functions using the QPainter::drawText( int x, int y, const QString &text ) method will get a wrong alignment of their text as localized versions should have all text right aligned.
Using the variant of drawText that takes a rectangle to draw text into will correctly take care of alignment issues. Arabic or Hebrew text will be right aligned, other text left aligned by default.
Copyright © 2001 Trolltech | Trademarks | Qt version 3.0.0-beta3
|