title: How to change the locale of R?
body: <p>I’m using R version 2.15.3 (2013-03-01) on Ubuntu 12.10. The System is in German and so is R. This comes unhandy when searching for error messages. </p>
  
  <p>Executing R in xterm this way  <code>$ LANG="C" R</code> partially solves the issue. Then R displays everything in English. But when loading RStudio this way, the R interpreter is still in German. So I’m looking for a way to change the locale of R in R itself. </p>
  
  <p>I found this: <a href="https://stackoverflow.com/questions/13575180/how-to-change-the-language-of-errors-in-r">How to change language settings in R</a>, but <code>Sys.setenv(LANG = "en")</code> does’t work for me:</p>
  
  <pre><code>2+x
  # Fehler: Objekt 'x' nicht gefunden
  Sys.setenv(LANG = "en")
  2+x
  # Fehler: Objekt 'x' nicht gefunden
  </code></pre>
  
  <p>I also tried <code>Sys.setenv(LANG = "en_US.UTF-8")</code> with no success.</p>
  
  <p>Output of <code>Sys.getlocale()</code></p>
  
  <pre><code>Sys.getlocale()
  # [1] "LC_CTYPE=de_DE.UTF-8;LC_NUMERIC=C;LC_TIME=de_DE.UTF-8;
  # LC_COLLATE=de_DE.UTF-8;LC_MONETARY=de_DE.UTF-8;LC_MESSAGES=de_DE.UTF-8;
  # LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=de_DE.UTF-8;
  # LC_IDENTIFICATION=C"
  </code></pre>
  
  <p>(linebrakes added for convenience)</p>