1 <?xml version='
1.0'
?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id=
"locale.conf">
8 <title>locale.conf
</title>
9 <productname>systemd
</productname>
13 <refentrytitle>locale.conf
</refentrytitle>
14 <manvolnum>5</manvolnum>
18 <refname>locale.conf
</refname>
19 <refpurpose>Configuration file for locale settings
</refpurpose>
23 <para><filename>/etc/locale.conf
</filename></para>
27 <title>Description
</title>
29 <para>The
<filename>/etc/locale.conf
</filename> file configures
30 system-wide locale settings. It is read at early boot by
31 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
</para>
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, ignoring comments and empty lines.
36 It is possible to source the configuration
37 from shell scripts, however, beyond mere variable assignments, no
38 shell features are supported, allowing applications to read the
39 file without implementing a shell compatible execution
42 <para>Note that the kernel command line options
43 <varname>locale.LANG=
</varname>,
44 <varname>locale.LANGUAGE=
</varname>,
45 <varname>locale.LC_CTYPE=
</varname>,
46 <varname>locale.LC_NUMERIC=
</varname>,
47 <varname>locale.LC_TIME=
</varname>,
48 <varname>locale.LC_COLLATE=
</varname>,
49 <varname>locale.LC_MONETARY=
</varname>,
50 <varname>locale.LC_MESSAGES=
</varname>,
51 <varname>locale.LC_PAPER=
</varname>,
52 <varname>locale.LC_NAME=
</varname>,
53 <varname>locale.LC_ADDRESS=
</varname>,
54 <varname>locale.LC_TELEPHONE=
</varname>,
55 <varname>locale.LC_MEASUREMENT=
</varname>,
56 <varname>locale.LC_IDENTIFICATION=
</varname> may be
57 used to override the locale settings at boot.
</para>
59 <para>The locale settings configured in
60 <filename>/etc/locale.conf
</filename> are system-wide and are
61 inherited by every service or user, unless overridden or unset by
62 individual programs or individual users.
</para>
64 <para>Depending on the operating system, other configuration files
65 might be checked for locale configuration as well, however only as
68 <para><filename>/etc/locale.conf
</filename> can be updated
70 <citerefentry><refentrytitle>systemd-localed.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
71 <citerefentry project='man-pages'
><refentrytitle>localectl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
72 may be used to alter the settings in this file during runtime from
74 <citerefentry><refentrytitle>systemd-firstboot
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
75 to customize them on mounted (but not booted) system images.
</para>
79 <title>Options
</title>
81 <para>The following locale settings may be set using
82 <filename>/etc/locale.conf
</filename>:
83 <varname>LANG=
</varname>,
84 <varname>LANGUAGE=
</varname>,
85 <varname>LC_CTYPE=
</varname>,
86 <varname>LC_NUMERIC=
</varname>,
87 <varname>LC_TIME=
</varname>,
88 <varname>LC_COLLATE=
</varname>,
89 <varname>LC_MONETARY=
</varname>,
90 <varname>LC_MESSAGES=
</varname>,
91 <varname>LC_PAPER=
</varname>,
92 <varname>LC_NAME=
</varname>,
93 <varname>LC_ADDRESS=
</varname>,
94 <varname>LC_TELEPHONE=
</varname>,
95 <varname>LC_MEASUREMENT=
</varname>,
96 <varname>LC_IDENTIFICATION=
</varname>.
97 Note that
<varname>LC_ALL
</varname> may not be configured in this
98 file. For details about the meaning and semantics of these
100 <citerefentry project='man-pages'
><refentrytitle>locale
</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
</para>
104 <title>Example
</title>
107 <title>German locale with English messages
</title>
109 <para><filename>/etc/locale.conf
</filename>:
</para>
111 <programlisting># Custom settings
114 LC_MESSAGES=en_US.UTF-
8</programlisting>
120 <title>See Also
</title>
122 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
123 <citerefentry project='man-pages'
><refentrytitle>locale
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
124 <citerefentry project='man-pages'
><refentrytitle>localectl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
125 <citerefentry><refentrytitle>systemd-localed.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
126 <citerefentry><refentrytitle>systemd-firstboot
</refentrytitle><manvolnum>1</manvolnum></citerefentry>