Activation: b-a-s problems.

Malcolm Tredinnick malcolm@commsecure.com.au
Thu, 08 Jan 2004 08:17:49 +1100


On Thu, 2004-01-08 at 04:24, Richard Hult wrote:
> ons 2004-01-07 klockan 16.51 skrev Mark McLoughlin:
> 
> Hi,
> 
> >   - Multiple languages
> > 
> > 	If a client running under language A activates a service and it has
> > already been activated under language B, we always want a new instance
> > of the service running under language B ... assuming that the service
> > provided is actually language specific and/or it cannot provide that
> > service for multiple languages.
> > 
> > 	At first glance, it might seem like per-language service activation is
> > the right way to go, but we do have at least one example of service that
> > can serve multiple languages - gconfd. So:
> > 
> > LANG=en_US clock
> > LANG=en_GB clock
> > 
> > 	should not cause two gconfds to be started, but rather gconfd will
> > correctly hand out the default value for the "hour_format" preference in
> > both cases (i.e. 12-hour in en_US and 24-hour in en_GB).
> > 
> > 	On the other hand, if you do:
> > 
> > LANG=en_US gnome-terminal
> > LANG=en_GB gnome-terminal
> > 
> > 	there should be two gnome-terminal processes - one which lets you
> > configure the terminal "colors" and the other which (correctly) lets you
> > configure the terminal "colours".
> 
> Are there any useful real world use cases for this? I can imagine that
> some applications don't work correctly in some locales, and therefore
> you'd want to run them in e.g. English. If so, then I guess that's good
> enough reason for having per-language services.

I have been in situations a few times of needing to run applications in
multiple locales (mostly when I was working in Hong Kong), but they were
pretty trivial situations from a DBus perspective.

(1) Some X Input Method programs (e.g. for Chinese input) need the
locale set to zh_CN or zh_TW. However, it can be argued that such
applications are broken and should just be fixed.

(2) When doing some joint work with some Chinese clients, it was much
easier for them if my editor display things in Chinese (including menu
items). I knew the editor well enough to manage this, but I would have
been doomed if my whole session was in Chinese. Now, people are
instantly thinking that this is a silly situation and I probably would
agree that it is very low priority (I used it a lot, but we could have
made do if it wasn't there).

(3) I regularly needed to take screenshots of windows in both
traditional and simplified Chinese versions. Being able to do something
like "LANG=zh_TW mozilla file:///..." was much easier than having to log
in using a different locale.

Now, all of these are possible to work around, but when you total up the
little situations like this, it starts to become an argument for
allowing multiple locales at once to be distinguished.

Malcolm