Some i18n questions



I have some comments about internationalization and Gtk.

I think that to properly do i18n, Gtk will need to use some kind of
message catalog system.  Gtk has to be aware of the system at least in
part because it provides text for some labels in composite widgets.
Currently a user writing an internationalized application will have to
hack Gtk in order to make this work correctly.

Fortunately the GNU project has a message catalog package, GNU
gettext.  I propose that Gtk use it.

I have an unfinished patch that does most of the work -- which is to
say, I've marked all the displayable strings in Gtk.  The remaining
stuff pretty simple.  Should I finish this and submit it?


Maybe just translating the text that Gtk provides isn't enough?  In
addition to that, it would be possible to set up labels (etc) so that
they kept track of the original text and the translation.  That way
dynamic language changes could be effected without programmer
intervention.  (In other words, the user switches his desired language
to Germany, and all the running Gtk apps reconfigure themselves,
without any explicit coding by the application developer.)  Is this
worth it?  I don't know, but it does have a high "gee whiz" factor.
(One problem with this plan is that you'd need a way to specify the
textdomain as well as just the label.)


None of these changes mean that Gtk applications would be forced to
use gettext.  Also, it would be possible to configure Gtk without
gettext support.


There are a couple of ramifications of using gettext:

* The gettext code should probably be distributed with Gtk, or at
  least readily available from the same place.

* Future widgets will have to be written with gettext in mind.
  This is easy to do.


Comments?  Questions?

Tom
-- 
tromey@cygnus.com                 Member, League for Programming Freedom



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