- Timestamp:
- 01/18/2007 04:34:14 PM (17 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 276015d2
- Parents:
- c6c037c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
postlfs/config/profile.xml
rc6c037c r0f442884 333 333 </indexterm> 334 334 335 <para>This script shows how to set some environment variables necessary for 336 native language support. Setting these variables properly gives you:</para> 337 338 <itemizedlist> 339 <listitem> 340 <para>the output of programs translated into your native language</para> 341 </listitem> 342 <listitem> 343 <para>correct classification of characters into letters, digits and 344 other classes – this is necessary for <application>Bash</application> 345 to accept keystrokes properly in non-English locales</para> 346 </listitem> 347 <listitem> 348 <para>the alphabetical sorting order correct for your country</para> 349 </listitem> 350 <listitem> 351 <para>proper default paper size</para> 352 </listitem> 353 <listitem> 354 <para>correct formatting of monetary, time and date values</para> 355 </listitem> 356 </itemizedlist> 357 358 <para>Replace <replaceable><ll></replaceable> with the two-letter code for 359 your language (e.g., <quote>en</quote>) and 360 <replaceable><CC></replaceable> with the two-letter code for your country 361 (e.g., <quote>GB</quote>). Also you may need to specify (and this is actually 362 the preferred form) your character encoding (e.g., <quote>iso8859-1</quote>) 363 after a dot (so that the result is <quote>en_GB.iso8859-1</quote>). Issue the 364 following command for more information:</para> 365 366 <screen><userinput>man 3 setlocale</userinput></screen> 367 368 <para>The list of all locales supported by <application>Glibc</application> 369 can be obtained by running the following command:</para> 370 371 <screen><userinput>locale -a</userinput></screen> 372 373 <para>After you are sure about your locale settings, create the 374 <filename>/etc/profile.d/i18n.sh</filename> file:</para> 335 <para>This script sets an environment variable necessary for 336 native language support. A full discussion on determining this 337 variable can be found on the <ulink 338 url="&lfs-root;/chapter07/profile.html">LFS Bash Shell 339 Startup Files</ulink> page.</para> 375 340 376 341 <screen role="root"><userinput>cat > /etc/profile.d/i18n.sh << "EOF" 377 342 <literal># Set up i18n variables 378 export LC_ALL=<replaceable><ll></replaceable>_<replaceable><CC></replaceable> 379 export LANG=<replaceable><ll></replaceable>_<replaceable><CC></replaceable> 380 export G_FILENAME_ENCODING=@locale</literal> 381 EOF</userinput></screen> 382 383 <para>The <envar>LC_ALL</envar> variable sets the same value for all locale 384 categories. For better control, you may prefer to set values individually for 385 all categories listed in the output of the <command>locale</command> 386 command.</para> 387 388 <para>The <envar>G_FILENAME_ENCODING</envar> variable tells applications 389 such as <application>Glib</application> and <application>GTK+</application> 390 that filenames are in the default locale encoding and not in UTF-8 as 391 assumed by default.</para> 343 export LANG=<replaceable><ll></replaceable>_<replaceable><CC></replaceable>.<replaceable><charmap></replaceable><replaceable><@modifiers></replaceable></literal> 344 EOF</userinput></screen> 392 345 393 346 </sect3>
Note:
See TracChangeset
for help on using the changeset viewer.