Re: How to show the same program with two different language sets?



On Wed, Mar 23, 2005 at 07:50:03PM +1000 or thereabouts, Asgeir Frimannsson wrote:
> On Wed, 23 Mar 2005 19:08, Christian Persch wrote:
> > Le mercredi 23 mars 2005 à 09:43 +0100, Roberto a écrit :

> > > Anyway, when I export LANG=en_US programs like XMMS, gqView,
> > > MidnightCommander and many others _do_change language to english.
> > > The problem regards only programs like Yelp or Nautilus.
> >
> > This is because there's only ever one instance of yelp; if you start it
> > again, it only tells the existing yelp to open a new window. So I don't
> > think there's a way to do this.
> 
> A way of doing it is by starting the second yelp as another user:
> 
> [asgeir localhost ~]$ LANG=no yelp &
> [asgeir localhost ~]$ su - otheruser
> Password:
> [otheruser localhost ~]$ LANG=es yelp

Since it's on Fedora Core 3, I'll add in a bit more for the archives
(and hope I am right). 

On Fedora, the way to change a single user's default language is 
to use the ~/.i18n file (which corresponds to the global one in 
/etc/sysconfig/i18n). 

So you can just create a ~/.i18n file for the other user with the
relevant locale in it, and everything for that user will come up in
that language. I presume "su -" will set up the environment correctly.
It certainly works for "ssh -X otheruser localhost", which I use:
"ssh -X otheruser localhost yelp" just came up perfectly.  

In case you need an example, here are the .i18n files I have on the
different accounts. I have a .i18n file of 
LANG="cy_GB.UTF-8"
And my current otheruser (actually, called 'test' :)) account has 
a ~/.i18n of
LANG="en_GB.UTF-8"

As I say, this works on Fedora, but I think it may be quite specific
to that distribution. I do not know whether any other distributions
use this file.

It's a lot simpler than sticking a list of possibly-relevant environment
variables into .bashrc, .bash_profile, and everything else you can 
think of, which is what I did originally. 
 
Telsa



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