EVOLUTION-MANAGER
Edit File: stri_locale_set.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Set or Get Default Locale in 'stringi'</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for stri_locale_set {stringi}"><tr><td>stri_locale_set {stringi}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Set or Get Default Locale in <span class="pkg">stringi</span></h2> <h3>Description</h3> <p><code>stri_locale_set</code> changes the default locale for all the functions in the <span class="pkg">stringi</span> package, i.e., establishes the meaning of the “<code>NULL</code> locale” argument of locale-sensitive functions. <code>stri_locale_get</code> gives the current default locale. </p> <h3>Usage</h3> <pre> stri_locale_set(locale) stri_locale_get() </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>locale</code></td> <td> <p>single string of the form <code>Language</code>, <code>Language_Country</code>, or <code>Language_Country_Variant</code>, e.g., <code>"en_US"</code>, see <code><a href="stri_locale_list.html">stri_locale_list</a></code>.</p> </td></tr> </table> <h3>Details</h3> <p>See <a href="stringi-locale.html">stringi-locale</a> for more information on the effect of changing the default locale. </p> <p><code>stri_locale_get</code> is the same as <code><a href="stri_locale_info.html">stri_locale_info</a>(NULL)$Name</code>. </p> <h3>Value</h3> <p><code>stri_locale_set</code> returns a string with previously used locale, invisibly. </p> <p><code>stri_locale_get</code> returns a string of the form <code>Language</code>, <code>Language_Country</code>, or <code>Language_Country_Variant</code>, e.g., <code>"en_US"</code>. </p> <h3>See Also</h3> <p>Other locale_management: <code><a href="stri_locale_info.html">stri_locale_info</a>()</code>, <code><a href="stri_locale_list.html">stri_locale_list</a>()</code>, <code><a href="stringi-locale.html">stringi-locale</a></code> </p> <h3>Examples</h3> <pre> ## 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) </pre> <hr /><div style="text-align: center;">[Package <em>stringi</em> version 1.4.6 <a href="00Index.html">Index</a>]</div> </body></html>