View source: R/locale_management.R
stri_locale_set | R Documentation |
stri_locale_set
changes the default locale for all the functions
in the stringi package,
i.e., establishes the meaning of the “NULL
locale” argument
of locale-sensitive functions.
stri_locale_get
gives the current default locale.
stri_locale_set(locale)
stri_locale_get()
locale |
single string of the form |
See stringi-locale for more information on the effect of changing the default locale.
stri_locale_get
is the same as stri_locale_info(NULL)$Name
.
stri_locale_set
returns a string with
previously used locale, invisibly.
stri_locale_get
returns a string of the form Language
,
Language_Country
, or Language_Country_Variant
,
e.g., 'en_US'
.
Marek Gagolewski and other contributors
The official online manual of stringi at https://stringi.gagolewski.com/
Gagolewski M., stringi: Fast and portable character string processing in R, Journal of Statistical Software 103(2), 2022, 1-59, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v103.i02")}
Other locale_management:
about_locale
,
stri_locale_info()
,
stri_locale_list()
## Not run:
oldloc <- stri_locale_set('pt_BR')
# ... some locale-dependent operations
# ... note that you may always modify a locale per-call
# ... changing the default locale is convenient if you perform
# ... many operations
stri_locale_set(oldloc) # restore the previous default locale
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.