I am trying to set my R console's language to English using a configuration file. I am using Debian and Ubuntu as my OS. To set the R console's language to English, I created ~/.Renviron
containing:
LANGUAGE = 'en_US.UTF-8'
LC_ALL = 'en_US.UTF-8'
This works, but I only found it through trial and error, so I am concerned that this will break if I change my system's default languages and locales in the future. These are my current system's environment variables:
$ env | grep "LANG\|LC_"
LANG=fr_FR.UTF-8
LANGUAGE=fr_FR.UTF-8:zh_CN.UTF-8:en_US.UTF-8
LC_ADDRESS=en_SG.UTF-8
LC_IDENTIFICATION=en_SG.UTF-8
LC_MONETARY=en_SG.UTF-8
LC_MEASUREMENT=en_SG.UTF-8
LC_NAME=en_SG.UTF-8
LC_NUMERIC=en_SG.UTF-8
LC_PAPER=en_SG.UTF-8
LC_TELEPHONE=en_SG.UTF-8
LC_TIME=en_SG.UTF-8
I want to make sure that no matter what my future system's LANG
, LANGUAGE
, LC_*
are going to be, the values in ~/.Renviron
will ensure that the R console's language is English. How can I do that? Does my current ~/.Renviron
achieve this goal?
In other words, is setting LANGUAGE
and LC_ALL
to en_US.UTF-8
in ~/.Renviron
sufficient to guarantee that the R console's language is always English no matter what my system's default languages and locales become in the future?
I've read this: How to change language settings in R, but the answers there do not use a configuration file.