Expand locale page to contain localectl examples

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10408 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Krejzi 2013-12-21 20:18:45 +00:00
parent 6463df6fa6
commit 62750a1dc9

View File

@ -118,6 +118,23 @@ LC_ALL=&lt;locale name&gt; locale int_prefix</userinput></screen>
<literal>LANG=<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable></literal>
EOF</userinput></screen>
<para>Note that you can modify <filename>/etc/locale.conf</filename> with
Systemd <command>localectl</command> utility. To use <command>localectl</command>
for the example above, run:</para>
<screen><userinput>localectl set-locale LANG="<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;"</replaceable></userinput></screen>
<para>You can also specify other language specific environment variables such
as <envar>LANG</envar>, <envar>LC_CTYPE</envar>, <envar>LC_NUMERIC</envar> or
any other environment variable from <command>locale</command> output. Just
seperate them with a space. An example where <envar>LANG</envar> is set as
en_US.UTF-8 but <envar>LC_CTYPE</envar> is set as just en_US is:</para>
<screen><userinput>localectl set-locale LANG="en_US.UTF-8" LC_CTYPE="en_US"</userinput></screen>
<note><para>Please note that <command>localectl</command> command can
be used only on a system booted with Systemd.</para></note>
<para>The <quote>C</quote> (default) and <quote>en_US</quote> (the recommended
one for United States English users) locales are different. <quote>C</quote>
uses the US-ASCII 7-bit character set, and treats bytes with the high bit set