White space fix only. Translators can ignore.

Sponsored by: iXsystems
This commit is contained in:
Dru Lavigne 2014-02-11 16:55:42 +00:00
parent 14f6f9faeb
commit 1951bf0bf6
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43874

View file

@ -110,14 +110,15 @@
<indexterm><primary>language codes</primary></indexterm>
<indexterm><primary>country codes</primary></indexterm>
<para>The <replaceable>LanguageCode</replaceable> and <replaceable>CountryCode</replaceable> are used
to determine the country
and the specific language
variation. <xref linkend="locale-lang-country"/> provides some
examples of <replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>:</para>
<para>The <replaceable>LanguageCode</replaceable> and
<replaceable>CountryCode</replaceable> are used to determine
the country and the specific language variation. <xref
linkend="locale-lang-country"/> provides some examples of
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>:</para>
<table xml:id="locale-lang-country" frame="none" pgwide="1">
<title>Common Language and Country Codes</title>
<tgroup cols="2">
<thead>
<row>
@ -148,10 +149,10 @@
<indexterm><primary>encodings</primary></indexterm>
<indexterm><primary>ASCII</primary></indexterm>
<para>Some languages, such as Chinese or Japanese, cannot be represented using ASCII characters
and require an extended language encoding using either
wide or multibyte characters. Older applications
may mistake these encodings for control
<para>Some languages, such as Chinese or Japanese, cannot be
represented using ASCII characters and require an extended
language encoding using either wide or multibyte characters.
Older applications may mistake these encodings for control
characters while newer applications usually recognize 8-bit
characters. Depending on the implementation, users may be
required to compile an application with wide or multibyte
@ -186,8 +187,7 @@
<itemizedlist>
<listitem>
<para><envar>LANG</envar>, which sets the locale<indexterm>
<primary>POSIX</primary>
</indexterm></para>
<primary>POSIX</primary></indexterm></para>
</listitem>
<listitem>
@ -207,27 +207,24 @@
<indexterm><primary>login class</primary></indexterm>
<para>Two methods are available for making the needed variable
assignments: the
<link linkend="login-class">login class</link> method, which
is the recommended method, and the
<link linkend="startup-file">startup file</link> method.
The next two sections demonstrate how to use both methods.</para>
assignments: the <link linkend="login-class">login
class</link> method, which is the recommended method, and
the <link linkend="startup-file">startup file</link> method.
The next two sections demonstrate how to use both
methods.</para>
<sect3 xml:id="login-class">
<title>Login Classes Method</title>
<para>This first method is the recommended method as it
assigns the required environment variables for
locale name and MIME character sets
for every possible shell.
This setup can either be
performed by each user or it can be configured for all users by the
superuser.</para>
assigns the required environment variables for locale name
and MIME character sets for every possible shell. This
setup can either be performed by each user or it can be
configured for all users by the superuser.</para>
<para>This minimal example sets both variables for
Latin-1 encoding in the
<filename>.login_conf</filename> of an individual user's
home directory:</para>
<para>This minimal example sets both variables for Latin-1
encoding in the <filename>.login_conf</filename> of an
individual user's home directory:</para>
<programlisting>me:\
:charset=ISO-8859-1:\
@ -235,12 +232,13 @@
<indexterm><primary>Traditional Chinese</primary>
<secondary>BIG-5 encoding</secondary></indexterm>
<para>Here is an example of a user's
<filename>~/.login_conf</filename> that sets the variables
for Traditional Chinese in BIG-5 encoding. More
variables are needed because some applications do not
correctly respect locale variables for Chinese,
Japanese, and Korean:</para>
for Traditional Chinese in BIG-5 encoding. More variables
are needed because some applications do not correctly
respect locale variables for Chinese, Japanese, and
Korean:</para>
<programlisting>#Users who do not wish to use monetary units or time formats
#of Taiwan can manually change each variable
@ -256,9 +254,10 @@ me:\
:charset=big5:\
:xmodifiers="@im=gcin": #Set gcin as the XIM Input Server</programlisting>
<para>Alternately, the superuser can configure all users of the system for localization. The following variables in
<filename>/etc/login.conf</filename> are used to set the locale and
MIME character sete:</para>
<para>Alternately, the superuser can configure all users of
the system for localization. The following variables in
<filename>/etc/login.conf</filename> are used to set the
locale and MIME character sete:</para>
<programlisting><replaceable>language_name</replaceable>|<replaceable>Account Type Description</replaceable>:\
:charset=<replaceable>MIME_charset</replaceable>:\
@ -273,11 +272,12 @@ me:\
:lang=de_DE.ISO8859-1:\
:tc=default:</programlisting>
<para>See &man.login.conf.5; for more
details about these variables.</para>
<para>See &man.login.conf.5; for more details about these
variables.</para>
<para>Whenever <filename>/etc/login.conf</filename> is edited, remember to execute the following
command to update the capability database:</para>
<para>Whenever <filename>/etc/login.conf</filename> is edited,
remember to execute the following command to update the
capability database:</para>
<screen>&prompt.root; <userinput>cap_mkdb /etc/login.conf</userinput></screen>
@ -303,18 +303,17 @@ me:\
<primary><command>adduser</command></primary>
</indexterm>
<indexterm><primary>login class</primary></indexterm>
<para>When using <command>adduser</command> to add new
users, the default language can be pre-configured for
all new users or specified for an individual user.</para>
users, the default language can be pre-configured for all
new users or specified for an individual user.</para>
<para>If all new users use the same language, set
<literal>defaultclass =
language</literal> in
<literal>defaultclass = language</literal> in
<filename>/etc/adduser.conf</filename>.</para>
<para>To override this setting when creating a
user, either input the required locale at
this prompt:</para>
<para>To override this setting when creating a user, either
input the required locale at this prompt:</para>
<screen><prompt>Enter login class: default []:</prompt></screen>
@ -326,8 +325,9 @@ me:\
<indexterm>
<primary><command>pw</command></primary>
</indexterm>
<para>If <command>pw</command> is used to add new users, specify the
locale as follows:</para>
<para>If <command>pw</command> is used to add new users,
specify the locale as follows:</para>
<screen>&prompt.root; <userinput>pw useradd user_name -L language</userinput></screen>
</sect4>
@ -336,21 +336,24 @@ me:\
<sect3 xml:id="startup-file">
<title>Shell Startup File Method</title>
<para>This method is not recommended as each shell that is used requires
manual configuration, where each shell has a different configuration file
and differing syntax. As an example, to set the German
language for the <command>sh</command> shell, these
lines could be added to <filename>~/.profile</filename> to set the shell for that user only.
Thse lines could also be added to <filename>/etc/profile</filename> or
<filename>/usr/share/skel/dot.profile</filename> to set that shell for all users:</para>
<para>This method is not recommended as each shell that is
used requires manual configuration, where each shell has a
different configuration file and differing syntax. As an
example, to set the German language for the
<command>sh</command> shell, these lines could be added to
<filename>~/.profile</filename> to set the shell for that
user only. Thse lines could also be added to
<filename>/etc/profile</filename> or
<filename>/usr/share/skel/dot.profile</filename> to set
that shell for all users:</para>
<programlisting><envar>LANG=de_DE.ISO8859-1; export LANG</envar>
<envar>MM_CHARSET=ISO-8859-1; export MM_CHARSET</envar></programlisting>
<para>However, the name of the configuration file and the
syntax used differs for the
<command>csh</command> shell. These are the equivalent
settings for <filename>~/.csh.login</filename>,
syntax used differs for the <command>csh</command> shell.
These are the equivalent settings for
<filename>~/.csh.login</filename>,
<filename>/etc/csh.login</filename>, or
<filename>/usr/share/skel/dot.login</filename>:</para>
@ -604,45 +607,40 @@ keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<sect1 xml:id="l10n-compiling">
<title>Compiling <acronym>i18n</acronym> Programs</title>
<para>The &os;
<link xlink:href="&url.base;/ports/index.html">&os; Ports
Collection</link> contains programs which provide
application support for wide or multibyte characters for several languages.
Refer to the <acronym>i18n</acronym> documentation in the
respective &os; port
for more information on how to configure the application correctly or to
determine which compile options to use when building the
port.</para>
<para>The &os; <link xlink:href="&url.base;/ports/index.html">&os;
Ports Collection</link> contains programs which provide
application support for wide or multibyte characters for several
languages. Refer to the <acronym>i18n</acronym> documentation
in the respective &os; port for more information on how to
configure the application correctly or to determine which
compile options to use when building the port.</para>
<para>Some things to keep in mind are:</para>
<itemizedlist>
<listitem>
<para>Language specific single C chars character sets
such as ISO8859-1, ISO8859-15, KOI8-R, and CP437. These
are described in &man.multibyte.3;.</para>
<para>Language specific single C chars character sets such as
ISO8859-1, ISO8859-15, KOI8-R, and CP437. These are
described in &man.multibyte.3;.</para>
</listitem>
<listitem>
<para>Wide or multibyte encodings such as EUC and
Big5.</para>
<para>Wide or multibyte encodings such as EUC and Big5.</para>
</listitem>
</itemizedlist>
<para>The active list of character sets can be found at the
<link
<para>The active list of character sets can be found at the <link
xlink:href="http://www.iana.org/assignments/character-sets">IANA
Registry</link>.</para>
<note>
<para>&os; uses Xorg-compatible locale encodings
instead.</para>
<para>&os; uses Xorg-compatible locale encodings instead.</para>
</note>
<para>In the &os; Ports Collection, <acronym>i18n</acronym>
applications include <literal>i18n</literal> in their names
for easy identification. However, they do not always support
the language needed.</para>
applications include <literal>i18n</literal> in their names for
easy identification. However, they do not always support the
language needed.</para>
<para>Many applications in the &os; Ports Collection have been
ported with <acronym>i18n</acronym> support. Some of these