Changeset 2164942


Ignore:
Timestamp:
Feb 13, 2011, 2:37:46 PM (14 years ago)
Author:
Joe Ciccone <jciccone@…>
Branches:
clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
Children:
c58eb217
Parents:
40fbd36
Message:

Rewrote the page about configuring the locales.

File:
1 edited

Legend:

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

    r40fbd36 r2164942  
    1111
    1212  <indexterm zone="ch-scripts-locale">
    13     <primary sortas="e-/etc/profile">/etc/profile</primary>
     13    <primary sortas="e-/etc/locale.conf">/etc/locale.conf</primary>
    1414  </indexterm>
    1515
    16   <para>The base <filename>/etc/profile</filename> below sets some
    17   environment variables necessary for native language support. Setting
    18   them properly results in:</para>
     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>
    1923
    2024  <itemizedlist>
     
    3943  </itemizedlist>
    4044
    41   <para>This script also sets the <envar>INPUTRC</envar> environment variable
    42   that makes Bash and Readline use the <filename>/etc/inputrc</filename> file
    43   created earlier.</para>
    44 
    4545  <para>Replace <replaceable>[ll]</replaceable> below with the
    4646  two-letter code for the desired language (e.g., <quote>en</quote>) and
    4747  <replaceable>[CC]</replaceable> with the two-letter code for the
    48   appropriate country (e.g., <quote>GB</quote>).
     48  appropriate country (e.g., <quote>GB</quote> or <quote>US</quote>).
    4949  <replaceable>[charmap]</replaceable> should be replaced with the
    5050  canonical charmap for your chosen locale.</para>
     
    7272  <para>This results in a final locale setting of <quote>en_US.UTF-8</quote>.
    7373  It is important that the locale found using the heuristic above is tested prior
    74   to it being added to the Bash startup files:</para>
     74  to it being added to <filename>/etc/locale.conf</filename>:</para>
    7575
    7676<screen role="nodump"><userinput>LC_ALL=[locale name] locale country
     
    113113
    114114  <para>Once the proper locale settings have been determined, create the
    115   <filename>/etc/profile</filename> file:</para>
     115  <filename>/etc/locale.conf</filename> file:</para>
    116116
    117 <screen><userinput>cat &gt; /etc/profile &lt;&lt; "EOF"
    118 <literal># Begin /etc/profile
     117<screen><userinput>cat &gt; /etc/locale.conf &lt;&lt; "EOF"
     118<literal># Begin /etc/locale.conf
    119119
    120 export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
    121 export INPUTRC=/etc/inputrc
     120LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
    122121
    123 # End /etc/profile</literal>
     122# End /etc/locale.conf</literal>
    124123EOF</userinput></screen>
    125124
Note: See TracChangeset for help on using the changeset viewer.