Re: How to create a simple multilingual GUI



On Mon, May 14, 2007 at 09:14:19AM +0300, Gabriel Schulhof wrote:
On Sun, 2007-05-13 at 02:19 +0200, David Nečas (Yeti) wrote:
Run-time switching of languages is not
possible http://bugzilla.gnome.org/show_bug.cgi?id=313736

Oh, it's possible, just very difficult. You have to keep all your
user-string-displaying widgets in a list, and set the label/text for
each of them every time the language changes, and after notifying
gettext of the change.

If the languages differ in the direction of reading
(LTR<->RTL), more has to be done.  Calling
gtk_widget_set_default_direction() with the direction
obtained from _("default:LTR") will generally take care of
it, though corner cases can remain.  Also labels (and input
widgets) possibly containing numbers or date & time have to
be rendered again, regettexting is not everything.  And
there are other regional settings you either have to deal
with or it's unclear what to do with upon a switch.  So,
impossible is probably a too strong word but maintenance
nightmare it definitely is.

Yeti

--
http://gwyddion.net/



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