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 --> 5 6<refentry id="locale.conf"> 7 <refentryinfo> 8 <title>locale.conf</title> 9 <productname>systemd</productname> 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 30 system-wide locale settings. It is read at early boot by 31 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para> 32 33 <para>The format of <filename>locale.conf</filename> is a newline-separated list of environment-like 34 shell-compatible variable assignments, ignoring comments and empty lines. It is possible to source the 35 configuration from shell scripts, however, beyond mere variable assignments, no shell features are 36 supported, allowing applications to read the file without implementing a shell compatible execution 37 engine. See 38 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> for a 39 detailed description of the format.</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 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 67 <para><filename>/etc/locale.conf</filename> can be updated 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> 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> 74 to customize them on mounted (but not booted) system images.</para> 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 99 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> 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># Custom settings 111 112LANG=de_DE.UTF-8 113LC_MESSAGES=en_US.UTF-8</programlisting> 114 </example> 115 116 </refsect1> 117 118 <refsect1> 119 <title>See Also</title> 120 <para> 121 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 122 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>, 123 <citerefentry project='man-pages'><refentrytitle>localectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 124 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, 125 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> 126 </para> 127 </refsect1> 128</refentry> 129