Changeset 6365b5d for BOOK/bootscripts


Ignore:
Timestamp:
Jan 23, 2014, 11:48:20 AM (11 years ago)
Author:
William Harrington <kb0iic@…>
Branches:
clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
ecc91b33
Parents:
ed3648a
Message:

Update locale configuration regarding systemd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOOK/bootscripts/common/locale.xml

    red3648a r6365b5d  
    1414  </indexterm>
    1515
    16   <para>The file <filename>/etc/locale.conf</filename> file configures
    17   system-wide locale settings. The basic file format of locale.conf is a
    18   newline-separated list of variable assignments. It is possible to source this
    19   configuration file from shell scripts, but it should never contain any shell
    20   script features beyond variable assignments. The
    21   <filename>locale.conf</filename> man page contains information about the
    22   function of this file. Setting up this file properly results in:</para>
     16  <para>The <filename>/etc/locale.conf</filename> below sets some environment
     17  variables necessary for native language support. Setting them properly
     18  results in:</para>
    2319
    2420  <itemizedlist>
     
    2723    </listitem>
    2824    <listitem>
    29       <para>Correct classification of characters into letters, digits and
    30       other classes. This is necessary for <command>bash</command> to
    31       properly accept non-ASCII characters in command lines in non-English
    32       locales</para>
     25      <para>Correct classification of characters into letters, digits and other
     26      classes. This is necessary for <command>bash</command> to properly accept
     27      non-ASCII characters in command lines in non-English locales</para>
    3328    </listitem>
    3429    <listitem>
     
    4843  appropriate country (e.g., <quote>GB</quote> or <quote>US</quote>).
    4944  <replaceable>[charmap]</replaceable> should be replaced with the
    50   canonical charmap for your chosen locale.</para>
     45  canonical charmap for your chosen locale. Optional modifiers such as
     46  <quote>@euro</quote> may also be present.</para>
    5147
    5248  <para>The list of all locales supported by Glibc can be obtained by running
     
    7167
    7268  <para>This results in a final locale setting of <quote>en_US.UTF-8</quote>.
    73   It is important that the locale found using the heuristic above is tested prior
    74   to it being added to <filename>/etc/locale.conf</filename>:</para>
     69  It is important that the locale found using the heuristic above is tested
     70  prior to it being added to <filename>/etc/locale.conf</filename>:</para>
    7571
    7672<screen role="nodump"><userinput>LC_ALL=[locale name] locale territory
     
    108104
    109105  <para>Other packages can also function incorrectly (but may not necessarily
    110   display any error messages) if the locale name does not meet their expectations.
    111   In those cases, investigating how other Linux distributions support your locale
    112   might provide some useful information.</para>
     106  display any error messages) if the locale name does not meet their
     107  expectations. In those cases, investigating how other Linux distributions
     108  support your locale might provide some useful information.</para>
    113109
    114110  <para>Once the proper locale settings have been determined, create the
     
    118114<literal># Begin /etc/locale.conf
    119115
    120 LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
     116LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable><replaceable>[@modifiers]</replaceable>
    121117
    122118# End /etc/locale.conf</literal>
    123119EOF</userinput></screen>
    124120
     121  <para>Note that you can modify <filename>/etc/locale.conf</filename> with
     122  Systemd <command>localectl</command> utility. To use
     123  <command>localectl</command> for the example above, run:</para>
     124
     125<screen role="nodump"><userinput>localectl set-locale LANG="<replaceable>[ll]_[CC][charmap][@modifiers]</replaceable>"</userinput></screen>
     126
     127  <para>You can also specify other language specific environment variables such
     128  as <envar>LANG</envar>, <envar>LC_CTYPE</envar>, <envar>LC_NUMERIC</envar> or
     129  any other environment variable from <command>locale</command> output. Just
     130  seperate them with a space. An example where <envar>LANG</envar> is set as
     131  en_US.UTF-8 but <envar>LC_CTYPE</envar> is set as just en_US is:</para>
     132
     133<screen role="nodump"><userinput>localectl set-locale LANG="en_US.UTF-8" LC_CTYPE="en_US"</userinput></screen>
     134
     135  <note><para>Please note that <command>localectl</command> command can
     136  be used  only on a system booted with Systemd.</para></note>
    125137  <para>Setting the keyboard layout, screen font, and locale-related
    126138  environment variables are the only internationalization steps needed to
Note: See TracChangeset for help on using the changeset viewer.