1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="locale.conf">
26 <title>locale.conf</title>
27 <productname>systemd</productname>
31 <contrib>Developer</contrib>
32 <firstname>Lennart</firstname>
33 <surname>Poettering</surname>
34 <email>lennart@poettering.net</email>
40 <refentrytitle>locale.conf</refentrytitle>
41 <manvolnum>5</manvolnum>
45 <refname>locale.conf</refname>
46 <refpurpose>Configuration file for locale settings</refpurpose>
50 <para><filename>/etc/locale.conf</filename></para>
54 <title>Description</title>
56 <para>The <filename>/etc/locale.conf</filename> file configures
57 system-wide locale settings. It is read at early-boot by
58 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
60 <para>The basic file format of <filename>locale.conf</filename> is
61 a newline-separated list of environment-like shell-compatible
62 variable assignments. It is possible to source the configuration
63 from shell scripts, however, beyond mere variable assignments, no
64 shell features are supported, allowing applications to read the
65 file without implementing a shell compatible execution
68 <para>Note that the kernel command line options
69 <varname>locale.LANG=</varname>,
70 <varname>locale.LANGUAGE=</varname>,
71 <varname>locale.LC_CTYPE=</varname>,
72 <varname>locale.LC_NUMERIC=</varname>,
73 <varname>locale.LC_TIME=</varname>,
74 <varname>locale.LC_COLLATE=</varname>,
75 <varname>locale.LC_MONETARY=</varname>,
76 <varname>locale.LC_MESSAGES=</varname>,
77 <varname>locale.LC_PAPER=</varname>,
78 <varname>locale.LC_NAME=</varname>,
79 <varname>locale.LC_ADDRESS=</varname>,
80 <varname>locale.LC_TELEPHONE=</varname>,
81 <varname>locale.LC_MEASUREMENT=</varname>,
82 <varname>locale.LC_IDENTIFICATION=</varname> may be
83 used to override the locale settings at boot.</para>
85 <para>The locale settings configured in
86 <filename>/etc/locale.conf</filename> are system-wide and are
87 inherited by every service or user, unless overridden or unset by
88 individual programs or individual users.</para>
90 <para>Depending on the operating system, other configuration files
91 might be checked for locale configuration as well, however only as
94 <para><citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
95 may be used to alter the settings in this file during runtime from
97 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
98 to initialize them on mounted (but not booted) system
103 <title>Options</title>
105 <para>The following locale settings may be set using
106 <filename>/etc/locale.conf</filename>:
107 <varname>LANG=</varname>,
108 <varname>LANGUAGE=</varname>,
109 <varname>LC_CTYPE=</varname>,
110 <varname>LC_NUMERIC=</varname>,
111 <varname>LC_TIME=</varname>,
112 <varname>LC_COLLATE=</varname>,
113 <varname>LC_MONETARY=</varname>,
114 <varname>LC_MESSAGES=</varname>,
115 <varname>LC_PAPER=</varname>,
116 <varname>LC_NAME=</varname>,
117 <varname>LC_ADDRESS=</varname>,
118 <varname>LC_TELEPHONE=</varname>,
119 <varname>LC_MEASUREMENT=</varname>,
120 <varname>LC_IDENTIFICATION=</varname>.
121 Note that <varname>LC_ALL</varname> may not be configured in this
122 file. For details about the meaning and semantics of these
124 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
128 <title>Example</title>
131 <title>German locale with English messages</title>
133 <para><filename>/etc/locale.conf</filename>:</para>
135 <programlisting>LANG=de_DE.UTF-8
136 LC_MESSAGES=en_US.UTF-8</programlisting>
142 <title>See Also</title>
144 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
145 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
146 <citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
147 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
148 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>