Fix some grammatical errors.

This commit is contained in:
Jim Mock 2000-03-11 01:46:38 +00:00
parent ed5dc939ef
commit 2f4179b7da
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6725
2 changed files with 600 additions and 658 deletions

View file

@ -75,10 +75,10 @@
convention.</para>
<para>Localization settings are based on three main terms:
Language Code, Country Code and Encoding. Locale name constructed
with this three parts as follows:</para>
Language Code, Country Code, and Encoding. Locale names are
constructed from these parts as follows:</para>
<programlisting>
<programlisting>
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
<sect2>
@ -125,19 +125,16 @@
<sect2>
<title>Encodings</title>
<para>Some languages use non-ASCII encodings
that are 8-bit or 16-bit wide characters.
Older applications do not recognize
them and mistake them for control characters. Newer applications
usually
do recognize 8-bit characters. Depending on implementation, users
may be required to compile an application with 16-bit support,
or configure it correctly.
To be able to input and process
16-bit wide characters, the <ulink url="../ports/">FreeBSD Ports
collection</ulink> has provided each language with different
programs. Refer to the i18n documentation in the respective
FreeBSD Port.</para>
<para>Some languages use non-ASCII encodings that are 8-bit or
16-bit wide characters. Older applications do not recognize them
and mistake them for control characters. Newer applications
usually do recognize 8-bit characters. Depending on the
implementation, users may be required to compile an application
with 16-bit support, or configure it correctly. To be able to
input and process 16-bit wide characters, the <ulink
url="../ports/">FreeBSD Ports collection</ulink> has provided
each language with different programs. Refer to the i18n
documentation in the respective FreeBSD Port.</para>
<para>Specifically, the user needs to look at the application
documentation to decide on how to configure it correctly or to
@ -147,19 +144,18 @@
<itemizedlist>
<listitem>
<para>Language specific 8-bit wide character sets, f.e.
<para>Language specific 8-bit wide character sets, i.e.,
ISO_8859-1, KOI8-R, CP437.</para>
</listitem>
<listitem>
<para>16-bit wide encodings, f.e. EUC, Big5.</para>
</listitem>
</itemizedlist>
<para>You can check active list of character sets at
<para>You can check the active list of character sets at the
<ulink
url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para>
url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para>
</sect2>
<sect2>
@ -169,24 +165,20 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
have been named with <literal>i18n</literal> in their names for
easy identification. However, they do not always support the
language needed.</para>
</sect2>
<sect2 id="setting-locale">
<title>Setting Locale</title>
<para>Theoretically, one only needs to export the value of his/her
locale name as <envar>LANG</envar>
in the login shell and is usually done
through the user's <filename>~/.login_conf</filename> or
the user login shell configuration
(<filename>~/.profile</filename>, <filename>~/.bashrc</filename>,
<filename>~/.cshrc</filename>).
This should set all of the locale
subsets (such as <envar>LC_CTYPE</envar>,
<envar>LC_CTIME</envar>, etc.).
Please refer to
language-specific FreeBSD documentation for more
locale name as <envar>LANG</envar> in the login shell and is
usually done through the user's
<filename>~/.login_conf</filename> or the user login shell
configuration (<filename>~/.profile</filename>,
<filename>~/.bashrc</filename>, <filename>~/.cshrc</filename>).
This should set all of the locale subsets (such as
<envar>LC_CTYPE</envar>, <envar>LC_CTIME</envar>, etc.). Please
refer to language-specific FreeBSD documentation for more
information.</para>
<para>You should set the following two values in your configuration
@ -211,50 +203,46 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
<title>Setting Locale Methods</title>
<para>There are two methods for setting locale, and both are
described below. The first (recommended one) is by
setting environment variables assignment in
<link linkend="login-class">login class</link>,
and the second is by adding environment variables assignment
to the system's shell
<link linkend="startup-file">startup file</link>.</para>
described below. The first (recommended one) is by assigning
the environment variables in <link linkend="login-class">login
class</link>, and the second is by adding the environment
variable assignments to the system's shell <link
linkend="startup-file">startup file</link>.</para>
<sect4 id="login-class">
<title>Login Classes Method</title>
<para>This method allows to assing environment
variables needed for locale name and MIME character set once
for every possible shell instead of adding specific shell assignment
to each shell startup file.
<link linkend="usr-setup">User Level Setup</link>
can be done by an user himself and
<link linkend="adm-setup">Administrator Level Setup</link> require
<para>This method allows environment variables needed for locale
name and MIME character sets to be assigned once for every
possible shell instead of adding specific shell assignments to
each shell's startup file. <link linkend="usr-setup">User
Level Setup</link> can be done by an user himself and <link
linkend="adm-setup">Administrator Level Setup</link> require
superuser priviledges.</para>
<sect5 id="usr-setup">
<title>User Level Setup</title>
<para>Here is minimal example of <filename>~/.login_conf</filename>
file in user's home directory which have both variables set
for Russian KOI8-R encoding:</para>
<para>Here is a minimal example of a
<filename>.login_conf</filename> file in user's home
directory which has both variables set for Russian KOI8-R
encoding:</para>
<programlisting>
me:My Account:\
:charset=KOI8-R:\
:lang=ru_RU.KOI8-R:</programlisting>
<para>See
<link linkend="adm-setup">Administrator Level Setup</link>
and
&man.login.conf.5; for explanation.</para>
<para>See <link linkend="adm-setup">Administrator Level
Setup</link> and &man.login.conf.5; for more details.</para>
</sect5>
<sect5 id="adm-setup">
<title>Administrator Level Setup</title>
<para>Check that <filename>/etc/login.conf</filename> have the
correct language user's class. Make sure these settings appear
in <filename>/etc/login.conf</filename>:</para>
correct language user's class. Make sure these settings
appear in <filename>/etc/login.conf</filename>:</para>
<programlisting>
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
@ -271,25 +259,26 @@ russian:Russian Users Accounts:\
:lang=ru_RU.KOI8-R:\
:tc=default:</programlisting>
<para>Changing Login Classes with &man.vipw.8;:</para>
<para>Changing Login Classes with &man.vipw.8;</para>
<para>Use <command>vipw</command> to add new users, and make the
entry look like this:</para>
<para>Use <command>vipw</command> to add new users, and make
the entry look like this:</para>
<programlisting>
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
<para>Changing Login Classes with &man.adduser.8;:</para>
<para>Changing Login Classes with &man.adduser.8;</para>
<para>Use <command>adduser</command> to add new users, and do
the following:</para>
<itemizedlist>
<listitem>
<para>Set <programlisting>defaultclass = <replaceable>language</replaceable></programlisting>
in <filename>/etc/adduser.conf</filename>. Keep in mind
you must enter <literal>default</literal> class for all
users of other languages in this case.</para>
<para>Set <literal>defaultclass =
<replaceable>language</replaceable></literal> in
<filename>/etc/adduser.conf</filename>. Keep in mind
you must enter a <literal>default</literal> class for
all users of other languages in this case.</para>
</listitem>
<listitem>
@ -301,13 +290,14 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<listitem>
<para>Another alternative is to use the following for each
user of a different language that you wish to add:</para>
user of a different language that you wish to
add:</para>
<screen>&prompt.root; <userinput>adduser -class <replaceable>language</replaceable></userinput></screen>
</listitem>
</itemizedlist>
<para>Changing Login Classes with &man.pw.8;:</para>
<para>Changing Login Classes with &man.pw.8;</para>
<para>If you use &man.pw.8; for adding new users, call it in
this form:</para>
@ -320,15 +310,15 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<title>Shell Startup File Method</title>
<note>
<para>This method is not recommended because require
different setup for each possible login program choosed.
Use <link linkend="login-class">Login Class Method</link>
<para>This method is not recommended because it requires a
different setup for each possible login program chosen. Use
the <link linkend="login-class">Login Class Method</link>
instead.</para>
</note>
<para>To add locale name and MIME character set
just set the two environment variables shown below in
the <filename>/etc/profile</filename> and/or
<para>To add the locale name and MIME character set, just set
the two environment variables shown below in the
<filename>/etc/profile</filename> and/or
<filename>/etc/csh.login</filename> shell startup files. We
will use the Russian language as an example below:</para>
@ -347,8 +337,9 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<para>Alternatively, you can add the above instructions to
<filename>/usr/share/skel/dot.profile</filename> (similar to
what was used in <filename>/etc/profile</filename> above), or
<filename>/usr/share/skel/dot.login</filename> (similar to what
was used in <filename>/etc/csh.login</filename> above).</para>
<filename>/usr/share/skel/dot.login</filename> (similar to
what was used in <filename>/etc/csh.login</filename>
above).</para>
<para>For X11:</para>
@ -363,9 +354,7 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<envar>setenv LANG ru_RU.KOI8-R</envar></programlisting>
<para>Depending on your shell (see above).</para>
</sect4>
</sect3>
</sect2>
@ -373,22 +362,21 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<title>Console Setup</title>
<para>For all 8-bit wide languages, set the correct console fonts
in <filename>/etc/rc.conf</filename> for the language in
question with:</para>
in <filename>/etc/rc.conf</filename> for the language in question
with:</para>
<programlisting>
font8x16=<replaceable>font_name</replaceable>
font8x14=<replaceable>font_name</replaceable>
font8x8=<replaceable>font_name</replaceable></programlisting>
<para><replaceable>font_name</replaceable> here taken from
<filename>/usr/share/syscons/fonts</filename> directory,
without <filename>.fnt</filename> suffix.</para>
<para>The <replaceable>font_name</replaceable> here is taken from
the <filename>/usr/share/syscons/fonts</filename> directory,
without the <filename>.fnt</filename> suffix.</para>
<para>Also be sure to set the correct keymap and screenmap for
your 8-bit language through
<filename>/stand/sysinstall</filename>. Once inside sysinstall,
choose <literal>Configure</literal>, then
<para>Also be sure to set the correct keymap and screenmap for your
8-bit language through <filename>/stand/sysinstall</filename>.
Once inside sysinstall, choose <literal>Configure</literal>, then
<literal>Console</literal>. Alternatively, you can add the
following to <filename>/etc/rc.conf</filename>:</para>
@ -397,47 +385,40 @@ scrnmap=<replaceable>screenmap_name</replaceable>
keymap=<replaceable>keymap_name</replaceable>
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<para><replaceable>screenmap_name</replaceable> here taken from
<filename>/usr/share/syscons/scrnmaps</filename> directory,
without <filename>.scm</filename> suffix.
Screenmap with corresponding mapped font
is usually needed as workaround for expanding
bit 8 to bit 9 on VGA adapter font character matrix
in pseudographics area, i.e.
to move letters out of that area if screen font use bit 8
column.</para>
<para>The <replaceable>screenmap_name</replaceable> here is taken
from the <filename>/usr/share/syscons/scrnmaps</filename>
directory, without the <filename>.scm</filename> suffix. A
screenmap with a corresponding mapped font is usually needed as a
workaround for expanding bit 8 to bit 9 on a VGA adapter's font
character matrix in pseudographics area, i.e., to move letters out
of that area if screen font uses a bit 8 column.</para>
<para>If you use &man.moused.8;, i.e. have
<para>According to the &man.moused.8; man page, you should have the
following setting in <filename>/etc/rc.conf</filename>:</para>
<programlisting>
moused_enable="YES"</programlisting>
<para>and your screen font uses bit 8 column of font
character matrix,
be shure that you compile your kernel with</para>
<para>If your screen font uses bit 8 column of font character
matrix, be sure that you compile your kernel with the following
options in your kernel configuration file to avoid bit 8 to bit 9
expansion of the font character with the mouse cursor on VGA
adapters.</para>
<programlisting>
options SC_MOUSE_CHAR=0x03</programlisting>
<para>in your kernel configuration file to avoid
bit 8 to bit 9 expansion of the font character
under mouse cursor on VGA adapters.
</para>
<para>The <replaceable>keymap_name</replaceable> here is taken from
the <filename>/usr/share/syscons/keymaps</filename> directory,
without the <filename>.kbd</filename> suffix.</para>
<para><replaceable>keymap_name</replaceable> here taken from
<filename>/usr/share/syscons/keymaps</filename> directory,
without <filename>.kbd</filename> suffix.</para>
<para>The <literal>keychange</literal> is usually needed to program
function keys to match the selected terminal type because
function key sequences can not be defined in the key map.</para>
<para><literal>keychange</literal> is usually needed
to program function keys to match selected terminal
type because function keys sequences can't be defined in
key map.</para>
<para>Also be shure to set correct console terminal type in
<filename>/etc/ttys</filename> for all
<literal>ttyv*</literal> entries.
Current pre-defined correspondences are:</para>
<para>Also be sure to set the correct console terminal type in
<filename>/etc/ttys</filename> for all <literal>ttyv*</literal>
entries. Current pre-defined correspondences are:</para>
<informaltable frame="none">
<tgroup cols="2">
@ -468,16 +449,15 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<entry>CP437 (hardware default)</entry>
<entry><literal>cons25</literal></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>For 16-bit wide languages, use the correct FreeBSD Port in your
<filename>/usr/ports/<replaceable>language</replaceable></filename>
directory. Some ports appear as console while the systems sees
it as serial vtty's, hence you must reserve enough vtty's for
both X11 and the pseudo-serial console. Here is a partial list of
<para>For 16-bit wide languages, use the correct FreeBSD port in
your <filename>/usr/ports/<replaceable>language</replaceable></filename>
directory. Some ports appear as console while the system sees it
as serial vtty's, hence you must reserve enough vtty's for both
X11 and the pseudo-serial console. Here is a partial list of
applications for using other languages in console:</para>
<informaltable frame="none">
@ -497,15 +477,14 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<row>
<entry>Japanese</entry>
<entry><filename>/usr/ports/japanese/ja-kon2-*</filename>
or <filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
<entry><filename>/usr/ports/japanese/ja-kon2-*</filename> or
<filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
</row>
<row>
<entry>Korean</entry>
<entry><filename>/usr/ports/korean/ko-han</filename></entry>
</row>
</tbody>
</tgroup>
</informaltable>
@ -516,13 +495,11 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para>Although X11 is not part of the FreeBSD Project, we have
included some information here for FreeBSD users. For more
details, refer to the <ulink
url="http://www.xfree86.org/">XFree86 website</ulink> or
whichever X11 Server you use.</para>
details, refer to the <ulink url="http://www.xfree86.org/">XFree86
website</ulink> or whichever X11 Server you use.</para>
<para>In <filename>~/.Xresources</filename>, you can
additionly tune
application specific i18n settings (e.g., fonts, menus,
<para>In <filename>~/.Xresources</filename>, you can additionally
tune application specific i18n settings (e.g., fonts, menus,
etc.).</para>
<sect3>
@ -530,8 +507,8 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para>Install the X11 True Type-Common server (XTT-common) and
install the language truetype fonts. Setting the correct
locale should allow you to view your selected language in
menus and such.</para>
locale should allow you to view your selected language in menus
and such.</para>
</sect3>
<sect3>
@ -549,26 +526,24 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para>8-bit characters are usually hardware coded into printers.
16-bit characters require special setup and we recommend using
<command>apsfilter</command>.
You may also convert the document to Postscript or
PDF formats using language specific converters.</para>
<application>apsfilter</application>. You may also convert the
document to Postscript or PDF formats using language specific
converters.</para>
</sect2>
<sect2>
<title>Kernel and File Systems</title>
<para>FreeBSD FFS filesystem is 8-bit clean so can be used
with any 8-bit wide character set, but there is no character
set name stored in filesystem, i.e. it is raw 8-bit and not
knows anything about encoding order. FFS not support any
form of 16-bit wide character sets yet.
</para>
<para>The FreeBSD FFS filesystem is 8-bit clean so can be used with
any 8-bit wide character set, but there is no character set name
stored in the filesystem; i.e., it is raw 8-bit and does not know
anything about encoding order. FFS does not support any form of
16-bit wide character sets yet.</para>
<para>FreeBSD MSDOS filesystem have configurable
ability to proceed conversion between
MSDOS plus Unicode character sets and choosed
FreeBSD filesystem character set, see
&man.mount.msdos.8; for details.</para>
<para>The FreeBSD MSDOS filesystem has the configurable ability to
convertbetween MSDOS plus Unicode character sets and choosen
FreeBSD filesystem character sets. See &man.mount.msdos.8; for
details.</para>
</sect2>
</sect1>
@ -652,7 +627,7 @@ options SC_MOUSE_CHAR=0x03</programlisting>
</sect1>
<sect1>
<title>Localizing FreeBSD to Specific Language</title>
<title>Localizing FreeBSD to Specific Languages</title>
<sect2>
<title>Russian Language (KOI8-R encoding)</title>
@ -660,16 +635,15 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para><emphasis>Originally contributed by
&a.ache;.</emphasis></para>
<para>See more info about KOI8-R encoding at <ulink
<para>For more information about KOI8-R encoding, see the <ulink
url="http://nagual.pp.ru/~ache/koi8.html">KOI8-R References
(Russian Net Character Set)</ulink>.</para>
<sect3>
<title>Locale Setup</title>
<para>Put following lines into
your <filename>~/.login_conf</filename>
file:</para>
<para>Put the following lines into your
<filename>~/.login_conf</filename> file:</para>
<programlisting>
me:My Account:\
@ -684,20 +658,19 @@ me:My Account:\
<title>Console Setup</title>
<itemizedlist>
<listitem>
<para>Add</para>
<para>Add the following to your kernel configuration
file:</para>
<programlisting>
<programlisting>
options SC_MOUSE_CHAR=0x03</programlisting>
<para>to your kernel configuration file.</para>
</listitem>
<listitem>
<para>Use following settings in
<filename>/etc/rc.conf</filename>:</para>
<programlisting>
<programlisting>
keymap="ru.koi8-r"
keychange="61 ^[[K"
scrnmap="koi8-r2cp866"
@ -705,23 +678,21 @@ font8x16="cp866b-8x16"
font8x14="cp866-8x14"
font8x8="cp866-8x8"</programlisting>
<para>Note that <literal>^[</literal> here stands for real
Escape character \033 entered directly in
<para>Note that the <literal>^[</literal> here stands for a
real Escape character (\033) entered directly in
<filename>/etc/rc.conf</filename>, not for sequence of two
characters '^' and '['.</para>
</listitem>
<listitem>
<para>For each <literal>ttyv*</literal> entry in
<filename>/etc/ttys</filename> use <literal>cons25r</literal>
as terminal type.</para>
<filename>/etc/ttys</filename>, use
<literal>cons25r</literal>as the terminal type.</para>
</listitem>
</itemizedlist>
<para>See earlier in this chapter for examples of setting up the
<link linkend="setting-console">console</link>.</para>
</sect3>
<sect3>
@ -805,9 +776,9 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
<para>To activate a Russian keyboard add a
<programlisting>XkbKeymap "xfree86(ru)"</programlisting>
line into the <literal>"Keyboard"</literal>
section in your <filename>/etc/XF86Config</filename> file. Also
make sure that <literal>XkbDisable</literal> is turned off
(commented out) there.</para>
section in your <filename>/etc/XF86Config</filename> file.
Also make sure that <literal>XkbDisable</literal> is turned
off (commented out) there.</para>
<para>The RUS/LAT switch will be <literal>CapsLock</literal>.
The old <literal>CapsLock</literal> function is still
@ -824,8 +795,8 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
NULL);</literal> function early in the program.
See <ulink
url="http://nagual.pp.ru/~ache/koi8/xwin.html">
KOI8-R for X-Window</ulink> for more
instructions for localizing X11 applications.</para>
KOI8-R for X-Window</ulink> for more instructions on
localizing X11 applications.</para>
</note>
</listitem>
</orderedlist>

View file

@ -75,10 +75,10 @@
convention.</para>
<para>Localization settings are based on three main terms:
Language Code, Country Code and Encoding. Locale name constructed
with this three parts as follows:</para>
Language Code, Country Code, and Encoding. Locale names are
constructed from these parts as follows:</para>
<programlisting>
<programlisting>
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
<sect2>
@ -125,19 +125,16 @@
<sect2>
<title>Encodings</title>
<para>Some languages use non-ASCII encodings
that are 8-bit or 16-bit wide characters.
Older applications do not recognize
them and mistake them for control characters. Newer applications
usually
do recognize 8-bit characters. Depending on implementation, users
may be required to compile an application with 16-bit support,
or configure it correctly.
To be able to input and process
16-bit wide characters, the <ulink url="../ports/">FreeBSD Ports
collection</ulink> has provided each language with different
programs. Refer to the i18n documentation in the respective
FreeBSD Port.</para>
<para>Some languages use non-ASCII encodings that are 8-bit or
16-bit wide characters. Older applications do not recognize them
and mistake them for control characters. Newer applications
usually do recognize 8-bit characters. Depending on the
implementation, users may be required to compile an application
with 16-bit support, or configure it correctly. To be able to
input and process 16-bit wide characters, the <ulink
url="../ports/">FreeBSD Ports collection</ulink> has provided
each language with different programs. Refer to the i18n
documentation in the respective FreeBSD Port.</para>
<para>Specifically, the user needs to look at the application
documentation to decide on how to configure it correctly or to
@ -147,19 +144,18 @@
<itemizedlist>
<listitem>
<para>Language specific 8-bit wide character sets, f.e.
<para>Language specific 8-bit wide character sets, i.e.,
ISO_8859-1, KOI8-R, CP437.</para>
</listitem>
<listitem>
<para>16-bit wide encodings, f.e. EUC, Big5.</para>
</listitem>
</itemizedlist>
<para>You can check active list of character sets at
<para>You can check the active list of character sets at the
<ulink
url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para>
url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para>
</sect2>
<sect2>
@ -169,24 +165,20 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
have been named with <literal>i18n</literal> in their names for
easy identification. However, they do not always support the
language needed.</para>
</sect2>
<sect2 id="setting-locale">
<title>Setting Locale</title>
<para>Theoretically, one only needs to export the value of his/her
locale name as <envar>LANG</envar>
in the login shell and is usually done
through the user's <filename>~/.login_conf</filename> or
the user login shell configuration
(<filename>~/.profile</filename>, <filename>~/.bashrc</filename>,
<filename>~/.cshrc</filename>).
This should set all of the locale
subsets (such as <envar>LC_CTYPE</envar>,
<envar>LC_CTIME</envar>, etc.).
Please refer to
language-specific FreeBSD documentation for more
locale name as <envar>LANG</envar> in the login shell and is
usually done through the user's
<filename>~/.login_conf</filename> or the user login shell
configuration (<filename>~/.profile</filename>,
<filename>~/.bashrc</filename>, <filename>~/.cshrc</filename>).
This should set all of the locale subsets (such as
<envar>LC_CTYPE</envar>, <envar>LC_CTIME</envar>, etc.). Please
refer to language-specific FreeBSD documentation for more
information.</para>
<para>You should set the following two values in your configuration
@ -211,50 +203,46 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
<title>Setting Locale Methods</title>
<para>There are two methods for setting locale, and both are
described below. The first (recommended one) is by
setting environment variables assignment in
<link linkend="login-class">login class</link>,
and the second is by adding environment variables assignment
to the system's shell
<link linkend="startup-file">startup file</link>.</para>
described below. The first (recommended one) is by assigning
the environment variables in <link linkend="login-class">login
class</link>, and the second is by adding the environment
variable assignments to the system's shell <link
linkend="startup-file">startup file</link>.</para>
<sect4 id="login-class">
<title>Login Classes Method</title>
<para>This method allows to assing environment
variables needed for locale name and MIME character set once
for every possible shell instead of adding specific shell assignment
to each shell startup file.
<link linkend="usr-setup">User Level Setup</link>
can be done by an user himself and
<link linkend="adm-setup">Administrator Level Setup</link> require
<para>This method allows environment variables needed for locale
name and MIME character sets to be assigned once for every
possible shell instead of adding specific shell assignments to
each shell's startup file. <link linkend="usr-setup">User
Level Setup</link> can be done by an user himself and <link
linkend="adm-setup">Administrator Level Setup</link> require
superuser priviledges.</para>
<sect5 id="usr-setup">
<title>User Level Setup</title>
<para>Here is minimal example of <filename>~/.login_conf</filename>
file in user's home directory which have both variables set
for Russian KOI8-R encoding:</para>
<para>Here is a minimal example of a
<filename>.login_conf</filename> file in user's home
directory which has both variables set for Russian KOI8-R
encoding:</para>
<programlisting>
me:My Account:\
:charset=KOI8-R:\
:lang=ru_RU.KOI8-R:</programlisting>
<para>See
<link linkend="adm-setup">Administrator Level Setup</link>
and
&man.login.conf.5; for explanation.</para>
<para>See <link linkend="adm-setup">Administrator Level
Setup</link> and &man.login.conf.5; for more details.</para>
</sect5>
<sect5 id="adm-setup">
<title>Administrator Level Setup</title>
<para>Check that <filename>/etc/login.conf</filename> have the
correct language user's class. Make sure these settings appear
in <filename>/etc/login.conf</filename>:</para>
correct language user's class. Make sure these settings
appear in <filename>/etc/login.conf</filename>:</para>
<programlisting>
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
@ -271,25 +259,26 @@ russian:Russian Users Accounts:\
:lang=ru_RU.KOI8-R:\
:tc=default:</programlisting>
<para>Changing Login Classes with &man.vipw.8;:</para>
<para>Changing Login Classes with &man.vipw.8;</para>
<para>Use <command>vipw</command> to add new users, and make the
entry look like this:</para>
<para>Use <command>vipw</command> to add new users, and make
the entry look like this:</para>
<programlisting>
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
<para>Changing Login Classes with &man.adduser.8;:</para>
<para>Changing Login Classes with &man.adduser.8;</para>
<para>Use <command>adduser</command> to add new users, and do
the following:</para>
<itemizedlist>
<listitem>
<para>Set <programlisting>defaultclass = <replaceable>language</replaceable></programlisting>
in <filename>/etc/adduser.conf</filename>. Keep in mind
you must enter <literal>default</literal> class for all
users of other languages in this case.</para>
<para>Set <literal>defaultclass =
<replaceable>language</replaceable></literal> in
<filename>/etc/adduser.conf</filename>. Keep in mind
you must enter a <literal>default</literal> class for
all users of other languages in this case.</para>
</listitem>
<listitem>
@ -301,13 +290,14 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<listitem>
<para>Another alternative is to use the following for each
user of a different language that you wish to add:</para>
user of a different language that you wish to
add:</para>
<screen>&prompt.root; <userinput>adduser -class <replaceable>language</replaceable></userinput></screen>
</listitem>
</itemizedlist>
<para>Changing Login Classes with &man.pw.8;:</para>
<para>Changing Login Classes with &man.pw.8;</para>
<para>If you use &man.pw.8; for adding new users, call it in
this form:</para>
@ -320,15 +310,15 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<title>Shell Startup File Method</title>
<note>
<para>This method is not recommended because require
different setup for each possible login program choosed.
Use <link linkend="login-class">Login Class Method</link>
<para>This method is not recommended because it requires a
different setup for each possible login program chosen. Use
the <link linkend="login-class">Login Class Method</link>
instead.</para>
</note>
<para>To add locale name and MIME character set
just set the two environment variables shown below in
the <filename>/etc/profile</filename> and/or
<para>To add the locale name and MIME character set, just set
the two environment variables shown below in the
<filename>/etc/profile</filename> and/or
<filename>/etc/csh.login</filename> shell startup files. We
will use the Russian language as an example below:</para>
@ -347,8 +337,9 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<para>Alternatively, you can add the above instructions to
<filename>/usr/share/skel/dot.profile</filename> (similar to
what was used in <filename>/etc/profile</filename> above), or
<filename>/usr/share/skel/dot.login</filename> (similar to what
was used in <filename>/etc/csh.login</filename> above).</para>
<filename>/usr/share/skel/dot.login</filename> (similar to
what was used in <filename>/etc/csh.login</filename>
above).</para>
<para>For X11:</para>
@ -363,9 +354,7 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<envar>setenv LANG ru_RU.KOI8-R</envar></programlisting>
<para>Depending on your shell (see above).</para>
</sect4>
</sect3>
</sect2>
@ -373,22 +362,21 @@ user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/us
<title>Console Setup</title>
<para>For all 8-bit wide languages, set the correct console fonts
in <filename>/etc/rc.conf</filename> for the language in
question with:</para>
in <filename>/etc/rc.conf</filename> for the language in question
with:</para>
<programlisting>
font8x16=<replaceable>font_name</replaceable>
font8x14=<replaceable>font_name</replaceable>
font8x8=<replaceable>font_name</replaceable></programlisting>
<para><replaceable>font_name</replaceable> here taken from
<filename>/usr/share/syscons/fonts</filename> directory,
without <filename>.fnt</filename> suffix.</para>
<para>The <replaceable>font_name</replaceable> here is taken from
the <filename>/usr/share/syscons/fonts</filename> directory,
without the <filename>.fnt</filename> suffix.</para>
<para>Also be sure to set the correct keymap and screenmap for
your 8-bit language through
<filename>/stand/sysinstall</filename>. Once inside sysinstall,
choose <literal>Configure</literal>, then
<para>Also be sure to set the correct keymap and screenmap for your
8-bit language through <filename>/stand/sysinstall</filename>.
Once inside sysinstall, choose <literal>Configure</literal>, then
<literal>Console</literal>. Alternatively, you can add the
following to <filename>/etc/rc.conf</filename>:</para>
@ -397,47 +385,40 @@ scrnmap=<replaceable>screenmap_name</replaceable>
keymap=<replaceable>keymap_name</replaceable>
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<para><replaceable>screenmap_name</replaceable> here taken from
<filename>/usr/share/syscons/scrnmaps</filename> directory,
without <filename>.scm</filename> suffix.
Screenmap with corresponding mapped font
is usually needed as workaround for expanding
bit 8 to bit 9 on VGA adapter font character matrix
in pseudographics area, i.e.
to move letters out of that area if screen font use bit 8
column.</para>
<para>The <replaceable>screenmap_name</replaceable> here is taken
from the <filename>/usr/share/syscons/scrnmaps</filename>
directory, without the <filename>.scm</filename> suffix. A
screenmap with a corresponding mapped font is usually needed as a
workaround for expanding bit 8 to bit 9 on a VGA adapter's font
character matrix in pseudographics area, i.e., to move letters out
of that area if screen font uses a bit 8 column.</para>
<para>If you use &man.moused.8;, i.e. have
<para>According to the &man.moused.8; man page, you should have the
following setting in <filename>/etc/rc.conf</filename>:</para>
<programlisting>
moused_enable="YES"</programlisting>
<para>and your screen font uses bit 8 column of font
character matrix,
be shure that you compile your kernel with</para>
<para>If your screen font uses bit 8 column of font character
matrix, be sure that you compile your kernel with the following
options in your kernel configuration file to avoid bit 8 to bit 9
expansion of the font character with the mouse cursor on VGA
adapters.</para>
<programlisting>
options SC_MOUSE_CHAR=0x03</programlisting>
<para>in your kernel configuration file to avoid
bit 8 to bit 9 expansion of the font character
under mouse cursor on VGA adapters.
</para>
<para>The <replaceable>keymap_name</replaceable> here is taken from
the <filename>/usr/share/syscons/keymaps</filename> directory,
without the <filename>.kbd</filename> suffix.</para>
<para><replaceable>keymap_name</replaceable> here taken from
<filename>/usr/share/syscons/keymaps</filename> directory,
without <filename>.kbd</filename> suffix.</para>
<para>The <literal>keychange</literal> is usually needed to program
function keys to match the selected terminal type because
function key sequences can not be defined in the key map.</para>
<para><literal>keychange</literal> is usually needed
to program function keys to match selected terminal
type because function keys sequences can't be defined in
key map.</para>
<para>Also be shure to set correct console terminal type in
<filename>/etc/ttys</filename> for all
<literal>ttyv*</literal> entries.
Current pre-defined correspondences are:</para>
<para>Also be sure to set the correct console terminal type in
<filename>/etc/ttys</filename> for all <literal>ttyv*</literal>
entries. Current pre-defined correspondences are:</para>
<informaltable frame="none">
<tgroup cols="2">
@ -468,16 +449,15 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<entry>CP437 (hardware default)</entry>
<entry><literal>cons25</literal></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>For 16-bit wide languages, use the correct FreeBSD Port in your
<filename>/usr/ports/<replaceable>language</replaceable></filename>
directory. Some ports appear as console while the systems sees
it as serial vtty's, hence you must reserve enough vtty's for
both X11 and the pseudo-serial console. Here is a partial list of
<para>For 16-bit wide languages, use the correct FreeBSD port in
your <filename>/usr/ports/<replaceable>language</replaceable></filename>
directory. Some ports appear as console while the system sees it
as serial vtty's, hence you must reserve enough vtty's for both
X11 and the pseudo-serial console. Here is a partial list of
applications for using other languages in console:</para>
<informaltable frame="none">
@ -497,15 +477,14 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<row>
<entry>Japanese</entry>
<entry><filename>/usr/ports/japanese/ja-kon2-*</filename>
or <filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
<entry><filename>/usr/ports/japanese/ja-kon2-*</filename> or
<filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
</row>
<row>
<entry>Korean</entry>
<entry><filename>/usr/ports/korean/ko-han</filename></entry>
</row>
</tbody>
</tgroup>
</informaltable>
@ -516,13 +495,11 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para>Although X11 is not part of the FreeBSD Project, we have
included some information here for FreeBSD users. For more
details, refer to the <ulink
url="http://www.xfree86.org/">XFree86 website</ulink> or
whichever X11 Server you use.</para>
details, refer to the <ulink url="http://www.xfree86.org/">XFree86
website</ulink> or whichever X11 Server you use.</para>
<para>In <filename>~/.Xresources</filename>, you can
additionly tune
application specific i18n settings (e.g., fonts, menus,
<para>In <filename>~/.Xresources</filename>, you can additionally
tune application specific i18n settings (e.g., fonts, menus,
etc.).</para>
<sect3>
@ -530,8 +507,8 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para>Install the X11 True Type-Common server (XTT-common) and
install the language truetype fonts. Setting the correct
locale should allow you to view your selected language in
menus and such.</para>
locale should allow you to view your selected language in menus
and such.</para>
</sect3>
<sect3>
@ -549,26 +526,24 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para>8-bit characters are usually hardware coded into printers.
16-bit characters require special setup and we recommend using
<command>apsfilter</command>.
You may also convert the document to Postscript or
PDF formats using language specific converters.</para>
<application>apsfilter</application>. You may also convert the
document to Postscript or PDF formats using language specific
converters.</para>
</sect2>
<sect2>
<title>Kernel and File Systems</title>
<para>FreeBSD FFS filesystem is 8-bit clean so can be used
with any 8-bit wide character set, but there is no character
set name stored in filesystem, i.e. it is raw 8-bit and not
knows anything about encoding order. FFS not support any
form of 16-bit wide character sets yet.
</para>
<para>The FreeBSD FFS filesystem is 8-bit clean so can be used with
any 8-bit wide character set, but there is no character set name
stored in the filesystem; i.e., it is raw 8-bit and does not know
anything about encoding order. FFS does not support any form of
16-bit wide character sets yet.</para>
<para>FreeBSD MSDOS filesystem have configurable
ability to proceed conversion between
MSDOS plus Unicode character sets and choosed
FreeBSD filesystem character set, see
&man.mount.msdos.8; for details.</para>
<para>The FreeBSD MSDOS filesystem has the configurable ability to
convertbetween MSDOS plus Unicode character sets and choosen
FreeBSD filesystem character sets. See &man.mount.msdos.8; for
details.</para>
</sect2>
</sect1>
@ -652,7 +627,7 @@ options SC_MOUSE_CHAR=0x03</programlisting>
</sect1>
<sect1>
<title>Localizing FreeBSD to Specific Language</title>
<title>Localizing FreeBSD to Specific Languages</title>
<sect2>
<title>Russian Language (KOI8-R encoding)</title>
@ -660,16 +635,15 @@ options SC_MOUSE_CHAR=0x03</programlisting>
<para><emphasis>Originally contributed by
&a.ache;.</emphasis></para>
<para>See more info about KOI8-R encoding at <ulink
<para>For more information about KOI8-R encoding, see the <ulink
url="http://nagual.pp.ru/~ache/koi8.html">KOI8-R References
(Russian Net Character Set)</ulink>.</para>
<sect3>
<title>Locale Setup</title>
<para>Put following lines into
your <filename>~/.login_conf</filename>
file:</para>
<para>Put the following lines into your
<filename>~/.login_conf</filename> file:</para>
<programlisting>
me:My Account:\
@ -684,20 +658,19 @@ me:My Account:\
<title>Console Setup</title>
<itemizedlist>
<listitem>
<para>Add</para>
<para>Add the following to your kernel configuration
file:</para>
<programlisting>
<programlisting>
options SC_MOUSE_CHAR=0x03</programlisting>
<para>to your kernel configuration file.</para>
</listitem>
<listitem>
<para>Use following settings in
<filename>/etc/rc.conf</filename>:</para>
<programlisting>
<programlisting>
keymap="ru.koi8-r"
keychange="61 ^[[K"
scrnmap="koi8-r2cp866"
@ -705,23 +678,21 @@ font8x16="cp866b-8x16"
font8x14="cp866-8x14"
font8x8="cp866-8x8"</programlisting>
<para>Note that <literal>^[</literal> here stands for real
Escape character \033 entered directly in
<para>Note that the <literal>^[</literal> here stands for a
real Escape character (\033) entered directly in
<filename>/etc/rc.conf</filename>, not for sequence of two
characters '^' and '['.</para>
</listitem>
<listitem>
<para>For each <literal>ttyv*</literal> entry in
<filename>/etc/ttys</filename> use <literal>cons25r</literal>
as terminal type.</para>
<filename>/etc/ttys</filename>, use
<literal>cons25r</literal>as the terminal type.</para>
</listitem>
</itemizedlist>
<para>See earlier in this chapter for examples of setting up the
<link linkend="setting-console">console</link>.</para>
</sect3>
<sect3>
@ -805,9 +776,9 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
<para>To activate a Russian keyboard add a
<programlisting>XkbKeymap "xfree86(ru)"</programlisting>
line into the <literal>"Keyboard"</literal>
section in your <filename>/etc/XF86Config</filename> file. Also
make sure that <literal>XkbDisable</literal> is turned off
(commented out) there.</para>
section in your <filename>/etc/XF86Config</filename> file.
Also make sure that <literal>XkbDisable</literal> is turned
off (commented out) there.</para>
<para>The RUS/LAT switch will be <literal>CapsLock</literal>.
The old <literal>CapsLock</literal> function is still
@ -824,8 +795,8 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
NULL);</literal> function early in the program.
See <ulink
url="http://nagual.pp.ru/~ache/koi8/xwin.html">
KOI8-R for X-Window</ulink> for more
instructions for localizing X11 applications.</para>
KOI8-R for X-Window</ulink> for more instructions on
localizing X11 applications.</para>
</note>
</listitem>
</orderedlist>