Re: [R] Fwd: Re: East Asian language

From: Prof Brian Ripley <>
Date: Fri 15 Jul 2005 - 22:25:23 EST

On Fri, 15 Jul 2005, Peter Dalgaard wrote:

> Gabor Grothendieck <> writes:
>> I am not sure how generally this works but I was able to get it to switch
>> back and forth between two languages within a single R
>> session like this:

The posting guide does ask people to read the documentation, and this is documented in the appropriate manual.

>>> Sys.getenv("LANGUAGE")
>> ""
>>> q() # note English prompt; c means continue rather than exiting
>> Save workspace image? [y/n/c]: c
>>> Sys.putenv(LANGUAGE="it")
>>> q() # note Italian prompt
>> Salva area di lavoro? [y/n/c]: c
>>> Sys.putenv(LANGUAGE="en")
>>> q() # now we are back to English
>> Save workspace image? [y/n/c]: n
> Hmm, doesn't quite seem to work on Fedora:
>> Sys.putenv(LANGUAGE="it")
>> q()
> Save workspace image? [y/n/c]: c
>> Sys.setenv(LANGUAGE="it")
> Errore: non trovo la funzione "Sys.setenv"
>> Sys.putenv(LANGUAGE="en")
>> Sys.setenv(LANGUAGE="it")
> Errore: non trovo la funzione "Sys.setenv"
>> q()
> Save workspace image? [y/n/c]: c
> So the save prompt is untranslated (but this happens with
> LANG=it_IT R
> as well(?!)), but worse, it doesn't seem to want to set the language
> back to English.

This is not intended to work: it is documented that LANGUAGE should be set outside the process. Does no one read the manuals? R-admin says

   `Note that you should not expect to be able to change the language once     R is running ...'

It is phrased that way because it _sometimes_ will work on _some_ OSes and on _some_ versions of gettext.

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Fri Jul 15 22:29:14 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:45 EST