[R] Fwd: Re: East Asian language
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Jul 15 14:25:23 CEST 2005
On Fri, 15 Jul 2005, Peter Dalgaard wrote:
> Gabor Grothendieck <ggrothendieck at gmail.com> 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")
>> 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, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list