Changeset 2164942
- Timestamp:
- Feb 13, 2011, 2:37:46 PM (14 years ago)
- Branches:
- clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- c58eb217
- Parents:
- 40fbd36
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/bootscripts/common/locale.xml
r40fbd36 r2164942 11 11 12 12 <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> 14 14 </indexterm> 15 15 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> 19 23 20 24 <itemizedlist> … … 39 43 </itemizedlist> 40 44 41 <para>This script also sets the <envar>INPUTRC</envar> environment variable42 that makes Bash and Readline use the <filename>/etc/inputrc</filename> file43 created earlier.</para>44 45 45 <para>Replace <replaceable>[ll]</replaceable> below with the 46 46 two-letter code for the desired language (e.g., <quote>en</quote>) and 47 47 <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>). 49 49 <replaceable>[charmap]</replaceable> should be replaced with the 50 50 canonical charmap for your chosen locale.</para> … … 72 72 <para>This results in a final locale setting of <quote>en_US.UTF-8</quote>. 73 73 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> 75 75 76 76 <screen role="nodump"><userinput>LC_ALL=[locale name] locale country … … 113 113 114 114 <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> 116 116 117 <screen><userinput>cat > /etc/ profile<< "EOF"118 <literal># Begin /etc/ profile117 <screen><userinput>cat > /etc/locale.conf << "EOF" 118 <literal># Begin /etc/locale.conf 119 119 120 export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable> 121 export INPUTRC=/etc/inputrc 120 LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable> 122 121 123 # End /etc/ profile</literal>122 # End /etc/locale.conf</literal> 124 123 EOF</userinput></screen> 125 124
Note:
See TracChangeset
for help on using the changeset viewer.