summaryrefslogtreecommitdiff
path: root/devdocs/elisp/locales.html
blob: b738736b3744d21e9b7030e5605fe83a1d5a9417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 <h3 class="section">Locales</h3>  <p>In POSIX, locales control which language to use in language-related features. These Emacs variables control how Emacs interacts with these features. </p> <dl> <dt id="locale-coding-system">Variable: <strong>locale-coding-system</strong>
</dt> <dd>
 <p>This variable specifies the coding system to use for decoding system error messages and—on X Window system only—keyboard input, for sending batch output to the standard output and error streams, for encoding the format argument to <code>format-time-string</code>, and for decoding the return value of <code>format-time-string</code>. </p>
</dd>
</dl> <dl> <dt id="system-messages-locale">Variable: <strong>system-messages-locale</strong>
</dt> <dd><p>This variable specifies the locale to use for generating system error messages. Changing the locale can cause messages to come out in a different language or in a different orthography. If the variable is <code>nil</code>, the locale is specified by environment variables in the usual POSIX fashion. </p></dd>
</dl> <dl> <dt id="system-time-locale">Variable: <strong>system-time-locale</strong>
</dt> <dd><p>This variable specifies the locale to use for formatting time values. Changing the locale can cause messages to appear according to the conventions of a different language. If the variable is <code>nil</code>, the locale is specified by environment variables in the usual POSIX fashion. </p></dd>
</dl> <dl> <dt id="locale-info">Function: <strong>locale-info</strong> <em>item</em>
</dt> <dd>
<p>This function returns locale data <var>item</var> for the current POSIX locale, if available. <var>item</var> should be one of these symbols: </p> <dl compact> <dt><code>codeset</code></dt> <dd>
<p>Return the character set as a string (locale item <code>CODESET</code>). </p> </dd> <dt><code>days</code></dt> <dd>
<p>Return a 7-element vector of day names (locale items <code>DAY_1</code> through <code>DAY_7</code>); </p> </dd> <dt><code>months</code></dt> <dd>
<p>Return a 12-element vector of month names (locale items <code>MON_1</code> through <code>MON_12</code>). </p> </dd> <dt><code>paper</code></dt> <dd><p>Return a list <code>(<var>width</var> <var>height</var>)</code> of 2 integers, for the default paper size measured in millimeters (locale items <code>_NL_PAPER_WIDTH</code> and <code>_NL_PAPER_HEIGHT</code>). </p></dd> </dl> <p>If the system can’t provide the requested information, or if <var>item</var> is not one of those symbols, the value is <code>nil</code>. All strings in the return value are decoded using <code>locale-coding-system</code>. See <a href="https://www.gnu.org/software/libc/manual/html_node/Locales.html#Locales">Locales</a> in <cite>The GNU Libc Manual</cite>, for more information about locales and locale items. </p>
</dd>
</dl><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Locales.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Locales.html</a>
  </p>
</div>