Re: GTK internationalization, right-to-left languages




Nimrod Zimerman <zimerman@earthling.net> writes:

> Hello.
> 
> I am pretty interested in knowing whether gtk+ was designed with
> internationalization in mind - especially as far as right-to-left languages
> (such as Arabic or Hebrew) are involved.
> 
> I feel that this issue is very important, primarily because as far as I know
> there are no solutions for right-to-left languages under X which are freely
> available.
> 
> I couldn't find referenced to this question in the FAQ or in the mailing
> list archives (which, by the way, are updated to mid-April).

As far as I know, no work has been done on right-to-left
internationalization of GTK+. But if someone wanted to work on it, I
think it would be great, and I'd provide whatever help I could.

From the small amount of research I've done on the subject, I think
the primary difficulty is that, although X11R6 has the framework in
place for rendering such languages (Output Methods), no free
implementation of Hebrew or Arabic output methods exists.

So, there would be two approaches adding such support to GTK. One
would be to write the output methods for X, and make GTK+ use
them. The other approach would be to add support for ad-hoc rendering
to GTK+.

(All existing RTL solutions I know of for X are of the ad-hoc
variety. In general, rendering Hebrew is much considerably than easier
than rendering Arabic, since Arabic requires contextual rendering -
characters have different forms in different positions)

In general, I think the output-method approach would be cleaner - but
it would have the disadvantage that the results would only be
applicable to Open Source X servers.

Once the rendering was worked out, I don't think there would be much
difficulty in adapting the widgets. The only widgets that care about
text direction in any complicated sort of way are the Entry and Text
widgets, and while cursor movement when entering mixed RTL and LTR
text is a bit complicated, it isn't a huge job. (More interesting,
though less useful would be adapting the Text widget to do
vertical entry of Asian languages)

The other question that has to be addressed is the question of textual
encoding. It is my intention to convert GTK+ to working in
Unicode/UTF-8 internally. The mapping of the characters in 
Arabic and Hebrew into Unicode should be straightforward - but
I don't know how or if information such as directional escapes
has a reprentation in Unicde. (Or if it matters... the direction
of rendering should be fairly well determined by the identity
of the characters).

So, if you have any further thoughts on the matter, interest
in working on this, or references to available information
on the subject, let us know.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]