GNOME Bugzilla – Bug 313736
Ability to switch language mid-session
Last modified: 2005-08-20 22:21:36 UTC
While discussing a recent language-related UI hack on gnome-i18n, I decided it would be more appropriate to continue this in Bugzilla on a proper feature request report :) http://mail.gnome.org/archives/gnome-i18n/2005-August/msg00184.html Basically, it would be cool if there was an applet (or keyboard shortcut) that could switch the language (e.g. as easily as you can already change the keyboard input layout, or the GTK theme). I don't know of any other OS that's done this (yet!), so not only would it be a cool feature, it has a few very significant use cases too (e.g. when showing off your GNOME desktop to someone you could switch it to'their native language to help them understand things, or for users learning/practicing new languages etc). The aim of this bug report is to explore the technical feasibility and identify places (e.g. gettext, session manager etc) where changes might need be needed to implement such a feature. Oh, and patches of course ;P
In short: not feasible. Think about all the places where translated content is passed around without necessary context to retranslate, think about ngettext, Q_(), N_(). It is not worth the huge effort it would take to make this sufficiently reliable.
Fair comment. Hadn't thought of it like that. So it still might be possible, but it would mean application developers would have to pass all the stuff gettext would need to their widgets for it to retranslate the string whenever the widget is (re)drawn? I can see that this would make things more complicated both inside and outside of GTK. Can this complexity be reduced/hidden somehow?
It might turn out to be a bit simpler with libglade-using apps, at least in the domain of UI translations (but this is just a guess, I didn't look at the code).
well, if you have a construct_all_ui() function, you can just do dump_all_ui(); setlocale(newlocale); construct_all_ui(); but that is hardly what you want.
Regarding applications that can change on the fly the languages of the UI messages, I'ld like to add Skype (www.skype.com). The language can change from Tools/Select language. The most complex message string it contains looks like "done (%d KB). %s left (%d KB per second)."
See http://live.gnome.org/GTK_2b_2fDynamicLanguages For details about the problems.
Not worth keeping this bug open, really.