[R-pkg-devel] Changing the locale
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Wed Mar 16 16:19:37 CET 2022
On 16/03/2022 9:29 a.m., Ben Engbers wrote:
> H,
>
> I
> - used the alternatives-command to change to R-devel (2021-12-10 r81318),
> - changed the locale in Fedora,
> - restarted RStudio,
> - Sys.setlocale() to locale = "en_GB",
That setting is local to the session, so it is lost when you restart
RStudio.
> - restarted RStudio,
> - rebuilt the package and
Generally rebuilding packages happens in a spawned session, so even if
you ran Sys.setlocale() in the session doing the building, it wouldn't
make a difference.
> - ran the .rmd but I still get the Dutch messages.
>
> Is there a way to delete the cached messages?
As Serguei said, set the environment variable LANG before starting R.
It might work if you set that env var within RStudio before building the
package (since spawned sessions inherit env vars), but only for the
messages printed during the build.
Duncan Murdoch
More information about the R-package-devel
mailing list