jay.sf
jay.sf

Reputation: 72891

How to get RStudio to use R language settings?

To set the R language to English we add language = EN to the Rconsole file in the ~\Program Files\R\R-3.6.2\ folder as e.g. described in this answer. This works as expected for the R GUI.

However, RStudio seems to ignore R language settings and starts up with the language of my system locale. I'm using Windows 7 x64 (build 7601) Service Pack 1, R version 3.6.2 (2019-12-12) and RStudio Version 1.2.5019.

enter image description here

There are a lot of answers that confuse R GUI and RStudio. How can we get RStudio to use the language settings defined in the Rconsole file? (Or, alternatively, where can we set the language for RStudio seperately?)

Upvotes: 5

Views: 1366

Answers (2)

Gilbert
Gilbert

Reputation: 3669

A workaround that works only if you want English, is to suppress the translation files.

An easy way to proceed is to uninstall R and then reinstall R without the translation files. So be sure to chose customize installation and to unselect the translation files during installation.

Upvotes: 1

user12560114
user12560114

Reputation: 11

I'm not quite sure, but it may have to do with the actual versions of RStudio (1.2.5019, 1.2.5033) With these I have the same problem (Windows 7pro/64, R 3.6.1). With the older RStudio version 1.2.5001, this problem does not exist.

addition as of Jan 6 2019:

I eventually seem to have figured out a solution to this problem. As pointed out by alberto in his answer to question in another context (see How to change the locale of R?), you have to edit your Renviron.site file such that it contains the line

LANGUAGE="en_US.utf8"

or, if you prefer R with British accent

LANGUAGE = "en_GB.utf8"

You may find your Renviron file in your R intallation folder, subfolder "etc".

Note that in a fresh installation of R, there is no file "Renviron.site". Then, just create it with a text editor.

Including in your Rcolsole file the line

language = en

may also help, though it is not sufficient.

Note the different use of Capitals and "" in Renviron and Rconsole.

You have t restart R after you modified/created Renviron.

Upvotes: 1

Related Questions