From owner-svn-doc-all@FreeBSD.ORG Tue Feb 11 14:59:29 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97B2BD62; Tue, 11 Feb 2014 14:59:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 758271AC1; Tue, 11 Feb 2014 14:59:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BExTTb038084; Tue, 11 Feb 2014 14:59:29 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BExTVK038082; Tue, 11 Feb 2014 14:59:29 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201402111459.s1BExTVK038082@svn.freebsd.org> From: Dru Lavigne Date: Tue, 11 Feb 2014 14:59:29 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43871 - head/en_US.ISO8859-1/books/handbook/l10n X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 14:59:29 -0000 Author: dru Date: Tue Feb 11 14:59:28 2014 New Revision: 43871 URL: http://svnweb.freebsd.org/changeset/doc/43871 Log: Initial pass at improving the flow and readability of this section. Several more commits to follow. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/l10n/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/l10n/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/l10n/chapter.xml Tue Feb 11 12:50:19 2014 (r43870) +++ head/en_US.ISO8859-1/books/handbook/l10n/chapter.xml Tue Feb 11 14:59:28 2014 (r43871) @@ -101,29 +101,27 @@ locale - Localization settings are based on three main terms: - Language Code, Country Code, and Encoding. Locale names are + Localization settings are based on three components: + the language code, country code, and encoding. Locale names are constructed from these parts as follows: LanguageCode_CountryCode.Encoding - - Language and Country Codes - language codes country codes - In order to localize a &os; system to a specific language, - the user needs to determine the codes for the specific country - and language as the country code tells applications which - variation of the given language to use. The following are - examples of language/country codes: + The LanguageCode and CountryCode are used + to determine the country + and the specific language + variation. provides some + examples of LanguageCode_CountryCode: - + + Common Language and Country Codes - Language/Country Code + LanguageCode_Country Code Description @@ -131,86 +129,49 @@ en_US - English - United States + English, United States ru_RU - Russian for Russia + Russian, Russia zh_TW - Traditional Chinese for Taiwan + Traditional Chinese, Taiwan - - - A complete listing of available locales can be found by - typing: - - &prompt.user; locale -a - - - - Encodings +
encodings ASCII - Some languages use non-ASCII encodings that are 8-bit, - wide, or multibyte characters. For more information on these - encodings, refer to &man.multibyte.3;. Older applications do - not recognize these encodings and mistake them for control - characters. Newer applications usually recognize 8-bit + 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 - character support, or configure it correctly. To provide - application support for wide or multibyte characters, the - &os; Ports - Collection contains programs for several languages. - Refer to the i18n documentation in the - respective &os; port. - - Specifically, the user needs to look at the application - documentation to decide how to configure it correctly or to - determine which compile options to use when building the - port. - - Some things to keep in mind are: - - - - Language specific single C chars character sets - such as ISO8859-1, ISO8859-15, KOI8-R, and CP437. These - are described in &man.multibyte.3;. - + character support, or configure it correctly. The rest of + this section describes the various methods for configuring the + locale on a &os; system. The next section will discuss the + considerations for finding or compiling applications with i18n + support. - - Wide or multibyte encodings such as EUC and - Big5. - - - - The active list of character sets can be found at the - IANA - Registry. + A complete listing of available locales can be found by + typing: - - &os; uses Xorg-compatible locale encodings - instead. - - - In the &os; Ports Collection, i18n - applications include i18n in their names - for easy identification. However, they do not always support - the language needed. -
+ &prompt.user; locale -a | more + + To determine the current locale setting: + + &prompt.user; locale - Setting Locale + Setting Locale for Login Shell Usually it is sufficient to export the value of the locale name as LANG in the login shell. This @@ -246,9 +207,6 @@ specific application configuration, and the Xorg configuration. - - Setting Locale Methods - locale login class @@ -260,25 +218,20 @@ system's shell startup file.
- + Login Classes Method - 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. - User Level Setup can be - performed by each user while - Administrator Level Setup - requires superuser privileges. - - - User Level Setup - - This provides a minimal example of a - .login_conf located in a user's - home directory which has both variables set for the - Latin-1 encoding: + This method assigns the required environment variables for + locale name and MIME character sets + for every possible shell. + This setup can be either be + performed by each user or it can be performed for all users by the + superuser. + + This minimal example sets both variables for the + Latin-1 encoding. These lines were added to the + .login_conf in an individual user's + home directory: me:\ :charset=ISO-8859-1:\ @@ -291,7 +244,7 @@ for Traditional Chinese in BIG-5 encoding. More variables are set because some applications do not correctly respect locale variables for Chinese, - Japanese, and Korean. + Japanese, and Korean: #Users who do not wish to use monetary units or time formats #of Taiwan can manually change each variable @@ -307,16 +260,11 @@ me:\ :charset=big5:\ :xmodifiers="@im=gcin": #Set gcin as the XIM Input Server - See Administrator Level - Setup and &man.login.conf.5; for more + See &man.login.conf.5; for more details. - - - - Administrator Level Setup - Verify that the user's login class in - /etc/login.conf sets the correct + Alternately, the superuser can configure all users of the system for localization. The following variables in the user's login class in + /etc/login.conf set the correct language: language_name|Account Type Description:\ @@ -332,13 +280,14 @@ me:\ :lang=de_DE.ISO8859-1:\ :tc=default: - Whenever this file is edited, execute the following + Whenever /etc/login.conf is edited, remember to execute the following command to update the capability database: &prompt.root; cap_mkdb /etc/login.conf - Changing Login Classes with - &man.vipw.8; + + Changing Login Classes with + &man.vipw.8; vipw @@ -348,9 +297,11 @@ me:\ language: user:password:1111:11:language:0:0:User Name:/home/user:/bin/sh + - Changing Login Classes with - &man.adduser.8; + + Changing Login Classes with + &man.adduser.8; adduser @@ -386,9 +337,11 @@ me:\ &prompt.root; adduser -class language + - Changing Login Classes with - &man.pw.8; + + Changing Login Classes with + &man.pw.8; pw @@ -396,10 +349,10 @@ me:\ it in this form: &prompt.root; pw useradd user_name -L language - - + + - + Shell Startup File Method @@ -439,7 +392,6 @@ me:\ LANG=de_DE.ISO8859-1; export LANG setenv LANG de_DE.ISO8859-1 - @@ -677,6 +629,46 @@ keychange="fkey_number sequ Compiling <acronym>i18n</acronym> Programs + The &os; + &os; Ports + Collection contains programs which provide + application support for wide or multibyte characters for several languages. + Refer to the i18n 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. + + Some things to keep in mind are: + + + + Language specific single C chars character sets + such as ISO8859-1, ISO8859-15, KOI8-R, and CP437. These + are described in &man.multibyte.3;. + + + + Wide or multibyte encodings such as EUC and + Big5. + + + + The active list of character sets can be found at the + IANA + Registry. + + + &os; uses Xorg-compatible locale encodings + instead. + + + In the &os; Ports Collection, i18n + applications include i18n in their names + for easy identification. However, they do not always support + the language needed. + Many applications in the &os; Ports Collection have been ported with i18n support. Some of these include -i18n in the port name. These