% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/locale_management.R
\name{stri_locale_set}
\alias{stri_locale_set}
\alias{stri_locale_get}
\title{Set or Get Default Locale in \pkg{stringi}}
\usage{
stri_locale_set(locale)

stri_locale_get()
}
\arguments{
\item{locale}{single string of the form \code{Language},
\code{Language_Country}, or \code{Language_Country_Variant}, e.g.,
\code{'en_US'}, see \code{\link{stri_locale_list}}.}
}
\value{
\code{stri_locale_set} returns a string with
previously used locale, invisibly.

\code{stri_locale_get} returns a string of the form \code{Language},
\code{Language_Country}, or \code{Language_Country_Variant},
e.g., \code{'en_US'}.
}
\description{
\code{stri_locale_set} changes the default locale for all the functions
in the \pkg{stringi} package,
i.e., establishes the meaning of the ``\code{NULL} locale'' argument
of locale-sensitive functions.
\code{stri_locale_get}
gives the current default locale.
}
\details{
See \link{stringi-locale} for more information on the effect of
changing the default locale.

\code{stri_locale_get} is the same as \code{\link{stri_locale_info}(NULL)$Name}.
}
\examples{
\dontrun{
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
}
}
\seealso{
Other locale_management: 
\code{\link{about_locale}},
\code{\link{stri_locale_info}()},
\code{\link{stri_locale_list}()}
}
\concept{locale_management}
