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