software

R Commander on Xubuntu 12.04 – changing the language

1 min read

After installing R and the Rcmdr package, the default language will be Portuguese (apparently Brazilian Portuguese). If you want to change the language, for example to English, you can follow these steps:

In the /usr/share/applications folder there is a file called Rcmdr.desktop, which holds the settings of the entry in the applications menu. What we need to do is add, to the command that is run, the LANGUAGE variable set to the language we want.

So the steps are (in a shell):

text
sudo vim /usr/share/applications/Rcmdr.desktop<br>

The line:

text
Exec=sh -c 'R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES Rcmdr" R "$@" '<br>

Becomes:

text
Exec=sh -c 'LANGUAGE="en" R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES Rcmdr" R "$@" '<br>

Save the file and Rcmdr will start with its menus and forms in the selected language.

Here we changed the language to English; for German, for example, we can use “de”.

#r commander#xubuntu