Thanks, this is exactly PR#18055. Should have looked (but assumed I
was probably just overlooking something ...)
On 2023-06-26 10:02 a.m., Sebastian Meyer wrote:
Translated strings are cached.
I'd recommend to use the
• New partly experimental Sys.setLanguage() utility, solving the
Translated strings are cached.
I'd recommend to use the
• New partly experimental Sys.setLanguage() utility, solving the
main problem of PR#18055.
introduced in R 4.2.0.
Best,
Sebastian Meyer
Am 26.06.23 um 15:15 schrieb Ben Bolker:
I was playing around with the settin
That's reasonable, but I'm wondering why it works the *first* time
it's called in a session. Is this just undefined behaviour (so I
shouldn't be surprised whatever happens)? Again,
$ Rscript -e 'sqrt(-1); Sys.setenv(LANGUAGE="es"); sqrt(-1)'
[1] NaN
Warning message:
In sqrt(-1) : NaNs produc
There is also some inconsistency.
Even though sqrt(-1) returns the warning/error about NaNs in German
after setting the language to Spanish, if you give the command
> messages()
it will respond in Spanish.
On Mon, Jun 26, 2023 at 4:39 PM Dirk Eddelbuettel wrote:
>
>
> Ben,
>
> POSIX level / gli
Ben,
POSIX level / glibc level variables are set at process start and AGAIK cannot
really be altered after start. They clearly work when set _before_ calling
sqrt(-1):
$ LANGUAGE=es Rscript -e 'sqrt(-1)'
[1] NaN
Warning message:
In sqrt(-1) : Se han producido NaNs
$ LANGUA
I was playing around with the setting of the LANGUAGE variable and am
wondering whether I'm missing something obvious about resetting the
value to its original state once it's been set. I seem to be able to
reset the language for warnings/errors once, but not to change it a
second time (or r