]>
Commit | Line | Data |
---|---|---|
663996b3 | 1 | <?xml version='1.0'?> <!--*-nxml-*--> |
bb4f798a | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
e735f4d4 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
bb4f798a | 4 | <!-- SPDX-License-Identifier: LGPL-2.1+ --> |
663996b3 MS |
5 | |
6 | <refentry id="locale.conf"> | |
e735f4d4 MP |
7 | <refentryinfo> |
8 | <title>locale.conf</title> | |
9 | <productname>systemd</productname> | |
e735f4d4 MP |
10 | </refentryinfo> |
11 | ||
12 | <refmeta> | |
13 | <refentrytitle>locale.conf</refentrytitle> | |
14 | <manvolnum>5</manvolnum> | |
15 | </refmeta> | |
16 | ||
17 | <refnamediv> | |
18 | <refname>locale.conf</refname> | |
19 | <refpurpose>Configuration file for locale settings</refpurpose> | |
20 | </refnamediv> | |
21 | ||
22 | <refsynopsisdiv> | |
23 | <para><filename>/etc/locale.conf</filename></para> | |
24 | </refsynopsisdiv> | |
25 | ||
26 | <refsect1> | |
27 | <title>Description</title> | |
28 | ||
29 | <para>The <filename>/etc/locale.conf</filename> file configures | |
db2df898 | 30 | system-wide locale settings. It is read at early boot by |
e735f4d4 MP |
31 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para> |
32 | ||
33 | <para>The basic file format of <filename>locale.conf</filename> is | |
34 | a newline-separated list of environment-like shell-compatible | |
35 | variable assignments. It is possible to source the configuration | |
36 | from shell scripts, however, beyond mere variable assignments, no | |
37 | shell features are supported, allowing applications to read the | |
38 | file without implementing a shell compatible execution | |
39 | engine.</para> | |
40 | ||
41 | <para>Note that the kernel command line options | |
42 | <varname>locale.LANG=</varname>, | |
43 | <varname>locale.LANGUAGE=</varname>, | |
44 | <varname>locale.LC_CTYPE=</varname>, | |
45 | <varname>locale.LC_NUMERIC=</varname>, | |
46 | <varname>locale.LC_TIME=</varname>, | |
47 | <varname>locale.LC_COLLATE=</varname>, | |
48 | <varname>locale.LC_MONETARY=</varname>, | |
49 | <varname>locale.LC_MESSAGES=</varname>, | |
50 | <varname>locale.LC_PAPER=</varname>, | |
51 | <varname>locale.LC_NAME=</varname>, | |
52 | <varname>locale.LC_ADDRESS=</varname>, | |
53 | <varname>locale.LC_TELEPHONE=</varname>, | |
54 | <varname>locale.LC_MEASUREMENT=</varname>, | |
55 | <varname>locale.LC_IDENTIFICATION=</varname> may be | |
56 | used to override the locale settings at boot.</para> | |
57 | ||
58 | <para>The locale settings configured in | |
59 | <filename>/etc/locale.conf</filename> are system-wide and are | |
60 | inherited by every service or user, unless overridden or unset by | |
61 | individual programs or individual users.</para> | |
62 | ||
63 | <para>Depending on the operating system, other configuration files | |
64 | might be checked for locale configuration as well, however only as | |
65 | fallback.</para> | |
66 | ||
6e866b33 | 67 | <para><filename>/etc/locale.conf</filename> is usually created and updated |
81c58355 MB |
68 | using |
69 | <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
70 | <citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
e735f4d4 MP |
71 | may be used to alter the settings in this file during runtime from |
72 | the command line. Use | |
73 | <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
81c58355 | 74 | to initialize them on mounted (but not booted) system images.</para> |
e735f4d4 MP |
75 | </refsect1> |
76 | ||
77 | <refsect1> | |
78 | <title>Options</title> | |
79 | ||
80 | <para>The following locale settings may be set using | |
81 | <filename>/etc/locale.conf</filename>: | |
82 | <varname>LANG=</varname>, | |
83 | <varname>LANGUAGE=</varname>, | |
84 | <varname>LC_CTYPE=</varname>, | |
85 | <varname>LC_NUMERIC=</varname>, | |
86 | <varname>LC_TIME=</varname>, | |
87 | <varname>LC_COLLATE=</varname>, | |
88 | <varname>LC_MONETARY=</varname>, | |
89 | <varname>LC_MESSAGES=</varname>, | |
90 | <varname>LC_PAPER=</varname>, | |
91 | <varname>LC_NAME=</varname>, | |
92 | <varname>LC_ADDRESS=</varname>, | |
93 | <varname>LC_TELEPHONE=</varname>, | |
94 | <varname>LC_MEASUREMENT=</varname>, | |
95 | <varname>LC_IDENTIFICATION=</varname>. | |
96 | Note that <varname>LC_ALL</varname> may not be configured in this | |
97 | file. For details about the meaning and semantics of these | |
98 | settings, refer to | |
e3bff60a | 99 | <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> |
e735f4d4 MP |
100 | </refsect1> |
101 | ||
102 | <refsect1> | |
103 | <title>Example</title> | |
104 | ||
105 | <example> | |
106 | <title>German locale with English messages</title> | |
107 | ||
108 | <para><filename>/etc/locale.conf</filename>:</para> | |
109 | ||
110 | <programlisting>LANG=de_DE.UTF-8 | |
14228c0d | 111 | LC_MESSAGES=en_US.UTF-8</programlisting> |
e735f4d4 MP |
112 | </example> |
113 | ||
114 | </refsect1> | |
115 | ||
116 | <refsect1> | |
117 | <title>See Also</title> | |
118 | <para> | |
119 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
e3bff60a MP |
120 | <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>, |
121 | <citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
e735f4d4 MP |
122 | <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
123 | <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
124 | </para> | |
125 | </refsect1> | |
663996b3 MS |
126 | |
127 | </refentry> |