# NOT RUN {
(current_locale <- sys_get_locale())
# Output simplified to character vector
sys_get_locale(simplify = TRUE)
# }
# NOT RUN {
# Not run since it (temporarily) affects system settings
english <- if(is_windows()) "English.United_Kingdom" else
if(is_mac()) "en_GB" else
if(is_linux()) "en_GB.utf8" else
"en"
sys_set_locale(LC_MONETARY = english)
sys_get_locale()
sys_set_locale(l = current_locale) #restore everything
# }
Run the code above in your browser using DataLab