After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 313736 - Ability to switch language mid-session
Ability to switch language mid-session
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-08-17 17:04 UTC by Ross Golder
Modified: 2005-08-20 22:21 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Ross Golder 2005-08-17 17:04:27 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
Comment 1 Matthias Clasen 2005-08-17 17:08:29 UTC
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.
Comment 2 Ross Golder 2005-08-17 17:29:58 UTC
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?
Comment 3 Danilo Segan 2005-08-17 17:32:26 UTC
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).
Comment 4 Matthias Clasen 2005-08-17 18:04:11 UTC
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.
Comment 5 Simos Xenitellis 2005-08-17 18:04:55 UTC
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)."
Comment 6 Owen Taylor 2005-08-17 20:13:05 UTC
See 

 http://live.gnome.org/GTK_2b_2fDynamicLanguages

For details about the problems.
Comment 7 Matthias Clasen 2005-08-20 22:21:36 UTC
Not worth keeping this bug open, really.