- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/bootscripts/common/locale.xml
r2164942 r9c06d27e 11 11 12 12 <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> 14 14 </indexterm> 15 15 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> 23 19 24 20 <itemizedlist> … … 43 39 </itemizedlist> 44 40 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 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> or <quote>US</quote>).48 appropriate country (e.g., <quote>GB</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 <filename>/etc/locale.conf</filename>:</para>74 to it being added to the Bash startup files:</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/ locale.conf</filename> file:</para>115 <filename>/etc/profile</filename> file:</para> 116 116 117 <screen><userinput>cat > /etc/ locale.conf<< "EOF"118 <literal># Begin /etc/ locale.conf117 <screen><userinput>cat > /etc/profile << "EOF" 118 <literal># Begin /etc/profile 119 119 120 LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable> 120 export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable> 121 export INPUTRC=/etc/inputrc 121 122 122 # End /etc/ locale.conf</literal>123 # End /etc/profile</literal> 123 124 EOF</userinput></screen> 124 125
Note:
See TracChangeset
for help on using the changeset viewer.