Ignore:
File:
1 edited

Legend:

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

    r2164942 r9c06d27e  
    1111
    1212  <indexterm zone="ch-scripts-locale">
    13     <primary sortas="e-/etc/locale.conf">/etc/locale.conf</primary>
     13    <primary sortas="e-/etc/profile">/etc/profile</primary>
    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 base <filename>/etc/profile</filename> below sets some
     17  environment variables necessary for native language support. Setting
     18  them properly results in:</para>
    2319
    2420  <itemizedlist>
     
    4339  </itemizedlist>
    4440
     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> or <quote>US</quote>).
     48  appropriate country (e.g., <quote>GB</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 <filename>/etc/locale.conf</filename>:</para>
     74  to it being added to the Bash startup files:</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/locale.conf</filename> file:</para>
     115  <filename>/etc/profile</filename> file:</para>
    116116
    117 <screen><userinput>cat &gt; /etc/locale.conf &lt;&lt; "EOF"
    118 <literal># Begin /etc/locale.conf
     117<screen><userinput>cat &gt; /etc/profile &lt;&lt; "EOF"
     118<literal># Begin /etc/profile
    119119
    120 LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
     120export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
     121export INPUTRC=/etc/inputrc
    121122
    122 # End /etc/locale.conf</literal>
     123# End /etc/profile</literal>
    123124EOF</userinput></screen>
    124125
Note: See TracChangeset for help on using the changeset viewer.