Language chooser at login
nalimilan at club.fr
Mon Jul 4 13:11:34 UTC 2011
Le lundi 04 juillet 2011 à 11:11 +0100, Matthew Paul Thomas a écrit :
> Robert Ancell wrote on 04/07/11 03:44:
> >> If you change the display language within a session, it does not take
> >> effect in that session, but only after you have logged out and
> >> logged in again. The language setting is one of the few things that
> >> works that way.
> > Yes, it's an unfortunate limitation of the system we use.
> So far, this discussion seems to be assuming that that limitation is
> unfixable. Windows has the same limitation, but Mac OS X (except for the
> Finder) does not, and many multilingual Web sites do not either.
> So, what would it take to remove that limitation in Ubuntu? What would
> it take to switch languages on the fly?
Rewriting all programs and doubling the number of lines of codes needed
to write a GUI? ;-)
More seriously, the problem is that apps get translated by calling
gettext() on every English string, which returns the localized version.
If you want to change a language on the fly, without restarting apps,
you'd need to reload al of those strings in one way or another, which
means re-running all of the code (i.e. actually restarting the app), or
adding signals all over the place.
What could probably be fixed, though, would be to allow changing
language for the session, so that newly started apps use the new
language. But then you'd need a way for all session services (power
manager, network manager, desktop shell...) to restart, else they'll
keep using the old language. And that means you mostly restart the
session. (From what you say, I guess that's what OS X does.)
So the best solution would be to add a way to easily log out and in
again to apply language settings.
More information about the ubuntu-desktop