1
0
Fork 0
cl-sites/guile.html_node/Locales.html
2024-12-17 12:49:28 +01:00

102 lines
6.7 KiB
HTML

<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual documents Guile version 3.0.10.
Copyright (C) 1996-1997, 2000-2005, 2009-2023 Free Software Foundation,
Inc.
Copyright (C) 2021 Maxime Devos
Copyright (C) 2024 Tomas Volf
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled "GNU Free
Documentation License." -->
<title>Locales (Guile Reference Manual)</title>
<meta name="description" content="Locales (Guile Reference Manual)">
<meta name="keywords" content="Locales (Guile Reference Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content=".texi2any-real">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Concept-Index.html" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="POSIX.html" rel="up" title="POSIX">
<link href="Encryption.html" rel="next" title="Encryption">
<link href="System-Identification.html" rel="prev" title="System Identification">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>
<link rel="stylesheet" type="text/css" href="https://www.gnu.org/software/gnulib/manual.css">
</head>
<body lang="en">
<div class="subsection-level-extent" id="Locales">
<div class="nav-panel">
<p>
Next: <a href="Encryption.html" accesskey="n" rel="next">Encryption</a>, Previous: <a href="System-Identification.html" accesskey="p" rel="prev">System Identification</a>, Up: <a href="POSIX.html" accesskey="u" rel="up"><abbr class="acronym">POSIX</abbr> System Calls and Networking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Locales-1"><span>7.2.13 Locales<a class="copiable-link" href="#Locales-1"> &para;</a></span></h4>
<a class="index-entry-id" id="index-locale-2"></a>
<dl class="first-deffn">
<dt class="deffn" id="index-setlocale"><span class="category-def">Scheme Procedure: </span><span><strong class="def-name">setlocale</strong> <var class="def-var-arguments">category [locale]</var><a class="copiable-link" href="#index-setlocale"> &para;</a></span></dt>
<dt class="deffnx def-cmd-deffn" id="index-scm_005fsetlocale"><span class="category-def">C Function: </span><span><strong class="def-name">scm_setlocale</strong> <var class="def-var-arguments">(category, locale)</var><a class="copiable-link" href="#index-scm_005fsetlocale"> &para;</a></span></dt>
<dd><p>Get or set the current locale, used for various internationalizations.
Locales are strings, such as &lsquo;<samp class="samp">sv_SE</samp>&rsquo;.
</p>
<p>If <var class="var">locale</var> is given then the locale for the given <var class="var">category</var>
is set and the new value returned. If <var class="var">locale</var> is not given then
the current value is returned. <var class="var">category</var> should be one of the
following values (see <a data-manual="libc" href="https://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html#Locale-Categories">Categories of Activities
that Locales Affect</a> in <cite class="cite">The GNU C Library Reference Manual</cite>):
</p>
<dl class="first-defvr first-defvar-alias-first-defvr">
<dt class="defvr defvar-alias-defvr" id="index-LC_005fALL"><span class="category-def">Variable: </span><span><strong class="def-name">LC_ALL</strong><a class="copiable-link" href="#index-LC_005fALL"> &para;</a></span></dt>
<dt class="defvrx defvarx-alias-defvrx def-cmd-defvr" id="index-LC_005fCOLLATE"><span class="category-def">Variable: </span><span><strong class="def-name">LC_COLLATE</strong><a class="copiable-link" href="#index-LC_005fCOLLATE"> &para;</a></span></dt>
<dt class="defvrx defvarx-alias-defvrx def-cmd-defvr" id="index-LC_005fCTYPE"><span class="category-def">Variable: </span><span><strong class="def-name">LC_CTYPE</strong><a class="copiable-link" href="#index-LC_005fCTYPE"> &para;</a></span></dt>
<dt class="defvrx defvarx-alias-defvrx def-cmd-defvr" id="index-LC_005fMESSAGES"><span class="category-def">Variable: </span><span><strong class="def-name">LC_MESSAGES</strong><a class="copiable-link" href="#index-LC_005fMESSAGES"> &para;</a></span></dt>
<dt class="defvrx defvarx-alias-defvrx def-cmd-defvr" id="index-LC_005fMONETARY"><span class="category-def">Variable: </span><span><strong class="def-name">LC_MONETARY</strong><a class="copiable-link" href="#index-LC_005fMONETARY"> &para;</a></span></dt>
<dt class="defvrx defvarx-alias-defvrx def-cmd-defvr" id="index-LC_005fNUMERIC"><span class="category-def">Variable: </span><span><strong class="def-name">LC_NUMERIC</strong><a class="copiable-link" href="#index-LC_005fNUMERIC"> &para;</a></span></dt>
<dt class="defvrx defvarx-alias-defvrx def-cmd-defvr" id="index-LC_005fTIME"><span class="category-def">Variable: </span><span><strong class="def-name">LC_TIME</strong><a class="copiable-link" href="#index-LC_005fTIME"> &para;</a></span></dt>
</dl>
<a class="index-entry-id" id="index-LANG"></a>
<p>A common usage is &lsquo;<samp class="samp">(setlocale LC_ALL &quot;&quot;)</samp>&rsquo;, which initializes all
categories based on standard environment variables (<code class="code">LANG</code> etc).
For full details on categories and locale names see <a data-manual="libc" href="https://www.gnu.org/software/libc/manual/html_node/Locales.html#Locales">Locales and Internationalization</a> in <cite class="cite">The GNU C Library Reference
Manual</cite>.
</p>
<p>Note that <code class="code">setlocale</code> affects locale settings for the whole
process. See <a class="xref" href="i18n-Introduction.html">locale objects and
<code class="code">make-locale</code></a>, for a thread-safe alternative.
</p></dd></dl>
</div>
<hr>
<div class="nav-panel">
<p>
Next: <a href="Encryption.html">Encryption</a>, Previous: <a href="System-Identification.html">System Identification</a>, Up: <a href="POSIX.html"><abbr class="acronym">POSIX</abbr> System Calls and Networking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>