Changeset 82fc053 for BOOK/bootscripts/common/locale.xml
- Timestamp:
- May 14, 2014, 1:21:04 AM (10 years ago)
- Branches:
- clfs-3.0.0-sysvinit, sysvinit
- Children:
- 056e32f4
- Parents:
- db71344
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
BOOK/bootscripts/common/locale.xml
rdb71344 r82fc053 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 <filename>/etc/locale.conf</filename> below sets some environment17 variables necessary for native language support. Setting them properly18 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> 19 19 20 20 <itemizedlist> … … 23 23 </listitem> 24 24 <listitem> 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> 25 <para>Correct classification of characters into letters, digits and 26 other classes. This is necessary for <command>bash</command> to 27 properly accept non-ASCII characters in command lines in non-English 28 locales</para> 28 29 </listitem> 29 30 <listitem> … … 38 39 </itemizedlist> 39 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 40 45 <para>Replace <replaceable>[ll]</replaceable> below with the 41 46 two-letter code for the desired language (e.g., <quote>en</quote>) and 42 47 <replaceable>[CC]</replaceable> with the two-letter code for the 43 appropriate country (e.g., <quote>GB</quote> or <quote>US</quote>).48 appropriate country (e.g., <quote>GB</quote>). 44 49 <replaceable>[charmap]</replaceable> should be replaced with the 45 canonical charmap for your chosen locale. Optional modifiers such as 46 <quote>@euro</quote> may also be present.</para> 50 canonical charmap for your chosen locale.</para> 47 51 48 52 <para>The list of all locales supported by Glibc can be obtained by running … … 67 71 68 72 <para>This results in a final locale setting of <quote>en_US.UTF-8</quote>. 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>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> 71 75 72 <screen role="nodump"><userinput>LC_ALL=[locale name] locale territory 76 <screen role="nodump"><userinput>LC_ALL=[locale name] locale territory 73 77 LC_ALL=[locale name] locale language 74 78 LC_ALL=[locale name] locale charmap … … 104 108 105 109 <para>Other packages can also function incorrectly (but may not necessarily 106 display any error messages) if the locale name does not meet their 107 expectations. In those cases, investigating how other Linux distributions108 support your localemight provide some useful information.</para>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> 109 113 110 114 <para>Once the proper locale settings have been determined, create the 111 <filename>/etc/ locale.conf</filename> file:</para>115 <filename>/etc/profile</filename> file:</para> 112 116 113 <screen><userinput>cat > /etc/ locale.conf<< "EOF"114 <literal># Begin /etc/ locale.conf117 <screen><userinput>cat > /etc/profile << "EOF" 118 <literal># Begin /etc/profile 115 119 116 LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable><replaceable>[@modifiers]</replaceable> 120 export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable> 121 export INPUTRC=/etc/inputrc 117 122 118 # End /etc/ locale.conf</literal>123 # End /etc/profile</literal> 119 124 EOF</userinput></screen> 120 125 121 <para>Note that you can modify <filename>/etc/locale.conf</filename> with122 systemd's <command>localectl</command> utility. To use123 <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 such128 as <envar>LANG</envar>, <envar>LC_CTYPE</envar>, <envar>LC_NUMERIC</envar> or129 any other environment variable from <command>locale</command> output. Just130 separate them with a space. An example where <envar>LANG</envar> is set as131 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 can136 be used only on a system booted with systemd.</para></note>137 126 <para>Setting the keyboard layout, screen font, and locale-related 138 127 environment variables are the only internationalization steps needed to
Note: See TracChangeset
for help on using the changeset viewer.