xref: /dflybsd-src/share/man/man7/nls.7 (revision dbd5a33c5e35aaddc671dcdbf8ebdc9271f413f3)
1dcc86267SJeroen Ruigrok/asmodai.\"     $NetBSD: nls.7,v 1.11 2003/06/26 11:55:56 wiz Exp $
2dcc86267SJeroen Ruigrok/asmodai.\"
3dcc86267SJeroen Ruigrok/asmodai.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
4dcc86267SJeroen Ruigrok/asmodai.\" All rights reserved.
5dcc86267SJeroen Ruigrok/asmodai.\"
6dcc86267SJeroen Ruigrok/asmodai.\" This code is derived from software contributed to The NetBSD Foundation
7dcc86267SJeroen Ruigrok/asmodai.\" by Gregory McGarry.
8dcc86267SJeroen Ruigrok/asmodai.\"
9dcc86267SJeroen Ruigrok/asmodai.\" Redistribution and use in source and binary forms, with or without
10dcc86267SJeroen Ruigrok/asmodai.\" modification, are permitted provided that the following conditions
11dcc86267SJeroen Ruigrok/asmodai.\" are met:
12dcc86267SJeroen Ruigrok/asmodai.\" 1. Redistributions of source code must retain the above copyright
13dcc86267SJeroen Ruigrok/asmodai.\"    notice, this list of conditions and the following disclaimer.
14dcc86267SJeroen Ruigrok/asmodai.\" 2. Redistributions in binary form must reproduce the above copyright
15dcc86267SJeroen Ruigrok/asmodai.\"    notice, this list of conditions and the following disclaimer in the
16dcc86267SJeroen Ruigrok/asmodai.\"    documentation and/or other materials provided with the distribution.
17dcc86267SJeroen Ruigrok/asmodai.\" 3. All advertising materials mentioning features or use of this software
18dcc86267SJeroen Ruigrok/asmodai.\"    must display the following acknowledgement:
19dcc86267SJeroen Ruigrok/asmodai.\"        This product includes software developed by the NetBSD
20dcc86267SJeroen Ruigrok/asmodai.\"        Foundation, Inc. and its contributors.
21dcc86267SJeroen Ruigrok/asmodai.\" 4. Neither the name of The NetBSD Foundation nor the names of its
22dcc86267SJeroen Ruigrok/asmodai.\"    contributors may be used to endorse or promote products derived
23dcc86267SJeroen Ruigrok/asmodai.\"    from this software without specific prior written permission.
24dcc86267SJeroen Ruigrok/asmodai.\"
25dcc86267SJeroen Ruigrok/asmodai.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26dcc86267SJeroen Ruigrok/asmodai.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27dcc86267SJeroen Ruigrok/asmodai.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28dcc86267SJeroen Ruigrok/asmodai.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29dcc86267SJeroen Ruigrok/asmodai.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30dcc86267SJeroen Ruigrok/asmodai.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31dcc86267SJeroen Ruigrok/asmodai.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32dcc86267SJeroen Ruigrok/asmodai.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33dcc86267SJeroen Ruigrok/asmodai.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34dcc86267SJeroen Ruigrok/asmodai.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35dcc86267SJeroen Ruigrok/asmodai.\" POSSIBILITY OF SUCH DAMAGE.
36dcc86267SJeroen Ruigrok/asmodai.\"
37*dbd5a33cSSascha Wildner.\" $DragonFly: src/share/man/man7/nls.7,v 1.3 2005/07/22 15:55:56 swildner Exp $
38dcc86267SJeroen Ruigrok/asmodai.\"
39dcc86267SJeroen Ruigrok/asmodai.Dd May 17, 2003
40dcc86267SJeroen Ruigrok/asmodai.Dt NLS 7
41dcc86267SJeroen Ruigrok/asmodai.Os
42dcc86267SJeroen Ruigrok/asmodai.Sh NAME
43dcc86267SJeroen Ruigrok/asmodai.Nm NLS
44dcc86267SJeroen Ruigrok/asmodai.Nd Native Language Support Overview
45dcc86267SJeroen Ruigrok/asmodai.Sh DESCRIPTION
46dcc86267SJeroen Ruigrok/asmodaiNative Language Support (NLS) provides commands for a single
47dcc86267SJeroen Ruigrok/asmodaiworldwide operating system base.
48dcc86267SJeroen Ruigrok/asmodaiAn internationalized system has no built-in assumptions or dependencies
49dcc86267SJeroen Ruigrok/asmodaion language-specific or cultural-specific conventions such as:
50dcc86267SJeroen Ruigrok/asmodai.Pp
51dcc86267SJeroen Ruigrok/asmodai.Bl -bullet -offset indent -compact
52dcc86267SJeroen Ruigrok/asmodai.It
53dcc86267SJeroen Ruigrok/asmodaiCharacter classifications
54dcc86267SJeroen Ruigrok/asmodai.It
55dcc86267SJeroen Ruigrok/asmodaiCharacter comparison rules
56dcc86267SJeroen Ruigrok/asmodai.It
57dcc86267SJeroen Ruigrok/asmodaiCharacter collation order
58dcc86267SJeroen Ruigrok/asmodai.It
59dcc86267SJeroen Ruigrok/asmodaiNumeric and monetary formatting
60dcc86267SJeroen Ruigrok/asmodai.It
61dcc86267SJeroen Ruigrok/asmodaiDate and time formatting
62dcc86267SJeroen Ruigrok/asmodai.It
63dcc86267SJeroen Ruigrok/asmodaiMessage-text language
64dcc86267SJeroen Ruigrok/asmodai.It
65dcc86267SJeroen Ruigrok/asmodaiCharacter sets
66dcc86267SJeroen Ruigrok/asmodai.El
67dcc86267SJeroen Ruigrok/asmodai.Pp
68dcc86267SJeroen Ruigrok/asmodaiAll information pertaining to cultural conventions and language is
69dcc86267SJeroen Ruigrok/asmodaiobtained at program run time.
70dcc86267SJeroen Ruigrok/asmodai.Pp
71dcc86267SJeroen Ruigrok/asmodai.Dq Internationalization
72dcc86267SJeroen Ruigrok/asmodai(often abbreviated
73dcc86267SJeroen Ruigrok/asmodai.Dq i18n )
74dcc86267SJeroen Ruigrok/asmodairefers to the operation by which system software is developed to support
75dcc86267SJeroen Ruigrok/asmodaimultiple cultural-specific and language-specific conventions.
76dcc86267SJeroen Ruigrok/asmodaiThis is a generalization process by which the system is untied from
77dcc86267SJeroen Ruigrok/asmodaicalling only English strings or other English-specific conventions.
78dcc86267SJeroen Ruigrok/asmodai.Dq Localization
79dcc86267SJeroen Ruigrok/asmodai(often abbreviated
80dcc86267SJeroen Ruigrok/asmodai.Dq l10n )
81dcc86267SJeroen Ruigrok/asmodairefers to the operations by which the user environment is customized to
82dcc86267SJeroen Ruigrok/asmodaihandle its input and output appropriate for specific language and cultural
83dcc86267SJeroen Ruigrok/asmodaiconventions.
84dcc86267SJeroen Ruigrok/asmodaiThis is a specialization process, by which generic methods already
85dcc86267SJeroen Ruigrok/asmodaiimplemented in an internationalized system are used in specific ways.
86dcc86267SJeroen Ruigrok/asmodaiThe formal description of cultural conventions for some country, together
87dcc86267SJeroen Ruigrok/asmodaiwith all associated translations targeted to the native language, is
88dcc86267SJeroen Ruigrok/asmodaicalled the
89dcc86267SJeroen Ruigrok/asmodai.Dq locale .
90dcc86267SJeroen Ruigrok/asmodai.Pp
91dcc86267SJeroen Ruigrok/asmodai.Dx
92dcc86267SJeroen Ruigrok/asmodaiprovides extensive support to programmers and system developers to
93dcc86267SJeroen Ruigrok/asmodaienable internationalized software to be developed.
94dcc86267SJeroen Ruigrok/asmodai.Dx
95dcc86267SJeroen Ruigrok/asmodaialso supplies a large variety of locales for system localization.
96dcc86267SJeroen Ruigrok/asmodai.Ss Localization of Information
97dcc86267SJeroen Ruigrok/asmodaiAll locale information is accessible to programs at run time so that
98dcc86267SJeroen Ruigrok/asmodaidata is processed and displayed correctly for specific cultural
99dcc86267SJeroen Ruigrok/asmodaiconventions and language.
100dcc86267SJeroen Ruigrok/asmodai.Pp
101dcc86267SJeroen Ruigrok/asmodaiA locale is divided into categories.
102dcc86267SJeroen Ruigrok/asmodaiA category is a group of language-specific and culture-specific conventions
103dcc86267SJeroen Ruigrok/asmodaias outlined in the list above.
104dcc86267SJeroen Ruigrok/asmodaiISO C specifies the following six standard categories supported by
105dcc86267SJeroen Ruigrok/asmodai.Dx :
106dcc86267SJeroen Ruigrok/asmodai.Pp
107dcc86267SJeroen Ruigrok/asmodai.Bl -tag -compact -width LC_MONETARYXX
108dcc86267SJeroen Ruigrok/asmodai.It LC_COLLATE
109dcc86267SJeroen Ruigrok/asmodaistring-collation order information
110dcc86267SJeroen Ruigrok/asmodai.It LC_CTYPE
111dcc86267SJeroen Ruigrok/asmodaicharacter classification, case conversion, and other character attributes
112dcc86267SJeroen Ruigrok/asmodai.It LC_MESSAGES
113dcc86267SJeroen Ruigrok/asmodaithe format for affirmative and negative responses
114dcc86267SJeroen Ruigrok/asmodai.It LC_MONETARY
115dcc86267SJeroen Ruigrok/asmodairules and symbols for formatting monetary numeric information
116dcc86267SJeroen Ruigrok/asmodai.It LC_NUMERIC
117dcc86267SJeroen Ruigrok/asmodairules and symbols for formatting nonmonetary numeric information
118dcc86267SJeroen Ruigrok/asmodai.It LC_TIME
119dcc86267SJeroen Ruigrok/asmodairules and symbols for formatting time and date information
120dcc86267SJeroen Ruigrok/asmodai.El
121dcc86267SJeroen Ruigrok/asmodai.Pp
122dcc86267SJeroen Ruigrok/asmodaiLocalization of the system is achieved by setting appropriate values
123dcc86267SJeroen Ruigrok/asmodaiin environment variables to identify which locale should be used.
124dcc86267SJeroen Ruigrok/asmodaiThe environment variables have the same names as their respective
125dcc86267SJeroen Ruigrok/asmodailocale categories.
126dcc86267SJeroen Ruigrok/asmodaiAdditionally, the
127dcc86267SJeroen Ruigrok/asmodai.Ev LANG ,
128dcc86267SJeroen Ruigrok/asmodai.Ev LC_ALL ,
129dcc86267SJeroen Ruigrok/asmodaiand
130dcc86267SJeroen Ruigrok/asmodai.Ev NLSPATH
131dcc86267SJeroen Ruigrok/asmodaienvironment variables are used.
132dcc86267SJeroen Ruigrok/asmodaiThe
133dcc86267SJeroen Ruigrok/asmodai.Ev NLSPATH
134dcc86267SJeroen Ruigrok/asmodaienvironment variable specifies a colon-separated list of directory names
135dcc86267SJeroen Ruigrok/asmodaiwhere the message catalog files of the NLS database are located.
136dcc86267SJeroen Ruigrok/asmodaiThe
137dcc86267SJeroen Ruigrok/asmodai.Ev LC_ALL
138dcc86267SJeroen Ruigrok/asmodaiand
139dcc86267SJeroen Ruigrok/asmodai.Ev LANG
140dcc86267SJeroen Ruigrok/asmodaienvironment variables also determine the current locale.
141dcc86267SJeroen Ruigrok/asmodai.Pp
142dcc86267SJeroen Ruigrok/asmodaiThe values of these environment variables contains a string format as:
143dcc86267SJeroen Ruigrok/asmodai.Pp
144dcc86267SJeroen Ruigrok/asmodai.Bd -literal
145dcc86267SJeroen Ruigrok/asmodai	language[_territory][.codeset][@modifier]
146dcc86267SJeroen Ruigrok/asmodai.Ed
147dcc86267SJeroen Ruigrok/asmodai.Pp
148dcc86267SJeroen Ruigrok/asmodaiValid values for the language field come from the ISO639 standard which
149dcc86267SJeroen Ruigrok/asmodaidefines two-character codes for many languages.
150dcc86267SJeroen Ruigrok/asmodaiSome common language codes are:
151dcc86267SJeroen Ruigrok/asmodai.Pp
152dcc86267SJeroen Ruigrok/asmodai.nf
153dcc86267SJeroen Ruigrok/asmodai.ta \w'SERBO-CROATIAN'u+2n +\w'DE'u+5n +\w'OCEANIC/INDONESIAN'u+2nC
154dcc86267SJeroen Ruigrok/asmodai\fILanguage Name\fP	\fICode\fP	\fILanguage Family\fP
155dcc86267SJeroen Ruigrok/asmodai.ta \w'SERBO-CROATIAN'u+2n +\w'DE'u+5n +\w'OCEANIC/INDONESIAN'u+2nC
156dcc86267SJeroen Ruigrok/asmodai.sp 5p
157dcc86267SJeroen Ruigrok/asmodaiABKHAZIAN	AB	IBERO-CAUCASIAN
158dcc86267SJeroen Ruigrok/asmodaiAFAN (OROMO)	OM	HAMITIC
159dcc86267SJeroen Ruigrok/asmodaiAFAR	AA	HAMITIC
160dcc86267SJeroen Ruigrok/asmodaiAFRIKAANS	AF	GERMANIC
161dcc86267SJeroen Ruigrok/asmodaiALBANIAN	SQ	INDO-EUROPEAN (OTHER)
162dcc86267SJeroen Ruigrok/asmodaiAMHARIC	AM	SEMITIC
163dcc86267SJeroen Ruigrok/asmodaiARABIC	AR	SEMITIC
164dcc86267SJeroen Ruigrok/asmodaiARMENIAN	HY	INDO-EUROPEAN (OTHER)
165dcc86267SJeroen Ruigrok/asmodaiASSAMESE	AS	INDIAN
166dcc86267SJeroen Ruigrok/asmodaiAYMARA	AY	AMERINDIAN
167dcc86267SJeroen Ruigrok/asmodaiAZERBAIJANI	AZ	TURKIC/ALTAIC
168dcc86267SJeroen Ruigrok/asmodaiBASHKIR	BA	TURKIC/ALTAIC
169dcc86267SJeroen Ruigrok/asmodaiBASQUE	EU	BASQUE
170dcc86267SJeroen Ruigrok/asmodaiBENGALI	BN	INDIAN
171dcc86267SJeroen Ruigrok/asmodaiBHUTANI	DZ	ASIAN
172dcc86267SJeroen Ruigrok/asmodaiBIHARI	BH	INDIAN
173dcc86267SJeroen Ruigrok/asmodaiBISLAMA	BI
174dcc86267SJeroen Ruigrok/asmodaiBRETON	BR	CELTIC
175dcc86267SJeroen Ruigrok/asmodaiBULGARIAN	BG	SLAVIC
176dcc86267SJeroen Ruigrok/asmodaiBURMESE	MY	ASIAN
177dcc86267SJeroen Ruigrok/asmodaiBYELORUSSIAN	BE	SLAVIC
178dcc86267SJeroen Ruigrok/asmodaiCAMBODIAN	KM	ASIAN
179dcc86267SJeroen Ruigrok/asmodaiCATALAN	CA	ROMANCE
180dcc86267SJeroen Ruigrok/asmodaiCHINESE	ZH	ASIAN
181dcc86267SJeroen Ruigrok/asmodaiCORSICAN	CO	ROMANCE
182dcc86267SJeroen Ruigrok/asmodaiCROATIAN	HR	SLAVIC
183dcc86267SJeroen Ruigrok/asmodaiCZECH	CS	SLAVIC
184dcc86267SJeroen Ruigrok/asmodaiDANISH	DA	GERMANIC
185dcc86267SJeroen Ruigrok/asmodaiDUTCH	NL	GERMANIC
186dcc86267SJeroen Ruigrok/asmodaiENGLISH	EN	GERMANIC
187dcc86267SJeroen Ruigrok/asmodaiESPERANTO	EO	INTERNATIONAL AUX.
188dcc86267SJeroen Ruigrok/asmodaiESTONIAN	ET	FINNO-UGRIC
189dcc86267SJeroen Ruigrok/asmodaiFAROESE	FO	GERMANIC
190dcc86267SJeroen Ruigrok/asmodaiFIJI	FJ	OCEANIC/INDONESIAN
191dcc86267SJeroen Ruigrok/asmodaiFINNISH	FI	FINNO-UGRIC
192dcc86267SJeroen Ruigrok/asmodaiFRENCH	FR	ROMANCE
193dcc86267SJeroen Ruigrok/asmodaiFRISIAN	FY	GERMANIC
194dcc86267SJeroen Ruigrok/asmodaiGALICIAN	GL	ROMANCE
195dcc86267SJeroen Ruigrok/asmodaiGEORGIAN	KA	IBERO-CAUCASIAN
196dcc86267SJeroen Ruigrok/asmodaiGERMAN	DE	GERMANIC
197dcc86267SJeroen Ruigrok/asmodaiGREEK	EL	LATIN/GREEK
198dcc86267SJeroen Ruigrok/asmodaiGREENLANDIC	KL	ESKIMO
199dcc86267SJeroen Ruigrok/asmodaiGUARANI	GN	AMERINDIAN
200dcc86267SJeroen Ruigrok/asmodaiGUJARATI	GU	INDIAN
201dcc86267SJeroen Ruigrok/asmodaiHAUSA	HA	NEGRO-AFRICAN
202dcc86267SJeroen Ruigrok/asmodaiHEBREW	HE	SEMITIC
203dcc86267SJeroen Ruigrok/asmodaiHINDI	HI	INDIAN
204dcc86267SJeroen Ruigrok/asmodaiHUNGARIAN	HU	FINNO-UGRIC
205dcc86267SJeroen Ruigrok/asmodaiICELANDIC	IS	GERMANIC
206dcc86267SJeroen Ruigrok/asmodaiINDONESIAN	ID	OCEANIC/INDONESIAN
207dcc86267SJeroen Ruigrok/asmodaiINTERLINGUA	IA	INTERNATIONAL AUX.
208dcc86267SJeroen Ruigrok/asmodaiINTERLINGUE	IE	INTERNATIONAL AUX.
209dcc86267SJeroen Ruigrok/asmodaiINUKTITUT	IU
210dcc86267SJeroen Ruigrok/asmodaiINUPIAK	IK	ESKIMO
211dcc86267SJeroen Ruigrok/asmodaiIRISH	GA	CELTIC
212dcc86267SJeroen Ruigrok/asmodaiITALIAN	IT	ROMANCE
213dcc86267SJeroen Ruigrok/asmodaiJAPANESE	JA	ASIAN
214dcc86267SJeroen Ruigrok/asmodaiJAVANESE	JV	OCEANIC/INDONESIAN
215dcc86267SJeroen Ruigrok/asmodaiKANNADA	KN	DRAVIDIAN
216dcc86267SJeroen Ruigrok/asmodaiKASHMIRI	KS	INDIAN
217dcc86267SJeroen Ruigrok/asmodaiKAZAKH	KK	TURKIC/ALTAIC
218dcc86267SJeroen Ruigrok/asmodaiKINYARWANDA	RW	NEGRO-AFRICAN
219dcc86267SJeroen Ruigrok/asmodaiKIRGHIZ	KY	TURKIC/ALTAIC
220dcc86267SJeroen Ruigrok/asmodaiKURUNDI	RN	NEGRO-AFRICAN
221dcc86267SJeroen Ruigrok/asmodaiKOREAN	KO	ASIAN
222dcc86267SJeroen Ruigrok/asmodaiKURDISH	KU	IRANIAN
223dcc86267SJeroen Ruigrok/asmodaiLAOTHIAN	LO	ASIAN
224dcc86267SJeroen Ruigrok/asmodaiLATIN	LA	LATIN/GREEK
225dcc86267SJeroen Ruigrok/asmodaiLATVIAN	LV	BALTIC
226dcc86267SJeroen Ruigrok/asmodaiLINGALA	LN	NEGRO-AFRICAN
227dcc86267SJeroen Ruigrok/asmodaiLITHUANIAN	LT	BALTIC
228dcc86267SJeroen Ruigrok/asmodaiMACEDONIAN	MK	SLAVIC
229dcc86267SJeroen Ruigrok/asmodaiMALAGASY	MG	OCEANIC/INDONESIAN
230dcc86267SJeroen Ruigrok/asmodaiMALAY	MS	OCEANIC/INDONESIAN
231dcc86267SJeroen Ruigrok/asmodaiMALAYALAM	ML	DRAVIDIAN
232dcc86267SJeroen Ruigrok/asmodaiMALTESE	MT	SEMITIC
233dcc86267SJeroen Ruigrok/asmodaiMAORI	MI	OCEANIC/INDONESIAN
234dcc86267SJeroen Ruigrok/asmodaiMARATHI	MR	INDIAN
235dcc86267SJeroen Ruigrok/asmodaiMOLDAVIAN	MO	ROMANCE
236dcc86267SJeroen Ruigrok/asmodaiMONGOLIAN	MN
237dcc86267SJeroen Ruigrok/asmodaiNAURU	NA
238dcc86267SJeroen Ruigrok/asmodaiNEPALI	NE	INDIAN
239dcc86267SJeroen Ruigrok/asmodaiNORWEGIAN	NO	GERMANIC
240dcc86267SJeroen Ruigrok/asmodaiOCCITAN	OC	ROMANCE
241dcc86267SJeroen Ruigrok/asmodaiORIYA	OR	INDIAN
242dcc86267SJeroen Ruigrok/asmodaiPASHTO	PS	IRANIAN
243dcc86267SJeroen Ruigrok/asmodaiPERSIAN (farsi)	FA	IRANIAN
244dcc86267SJeroen Ruigrok/asmodaiPOLISH	PL	SLAVIC
245dcc86267SJeroen Ruigrok/asmodaiPORTUGUESE	PT	ROMANCE
246dcc86267SJeroen Ruigrok/asmodaiPUNJABI	PA	INDIAN
247dcc86267SJeroen Ruigrok/asmodaiQUECHUA	QU	AMERINDIAN
248dcc86267SJeroen Ruigrok/asmodaiRHAETO-ROMANCE  RM	ROMANCE
249dcc86267SJeroen Ruigrok/asmodaiROMANIAN	RO	ROMANCE
250dcc86267SJeroen Ruigrok/asmodaiRUSSIAN	RU	SLAVIC
251dcc86267SJeroen Ruigrok/asmodaiSAMOAN	SM	OCEANIC/INDONESIAN
252dcc86267SJeroen Ruigrok/asmodaiSANGHO	SG	NEGRO-AFRICAN
253dcc86267SJeroen Ruigrok/asmodaiSANSKRIT	SA	INDIAN
254dcc86267SJeroen Ruigrok/asmodaiSCOTS GAELIC	GD	CELTIC
255dcc86267SJeroen Ruigrok/asmodaiSERBIAN	SR	SLAVIC
256dcc86267SJeroen Ruigrok/asmodaiSERBO-CROATIAN  SH	SLAVIC
257dcc86267SJeroen Ruigrok/asmodaiSESOTHO	ST	NEGRO-AFRICAN
258dcc86267SJeroen Ruigrok/asmodaiSETSWANA	TN	NEGRO-AFRICAN
259dcc86267SJeroen Ruigrok/asmodaiSHONA	SN	NEGRO-AFRICAN
260dcc86267SJeroen Ruigrok/asmodaiSINDHI	SD	INDIAN
261dcc86267SJeroen Ruigrok/asmodaiSINGHALESE	SI	INDIAN
262dcc86267SJeroen Ruigrok/asmodaiSISWATI	SS	NEGRO-AFRICAN
263dcc86267SJeroen Ruigrok/asmodaiSLOVAK	SK	SLAVIC
264dcc86267SJeroen Ruigrok/asmodaiSLOVENIAN	SL	SLAVIC
265dcc86267SJeroen Ruigrok/asmodaiSOMALI	SO	HAMITIC
266dcc86267SJeroen Ruigrok/asmodaiSPANISH	ES	ROMANCE
267dcc86267SJeroen Ruigrok/asmodaiSUNDANESE	SU	OCEANIC/INDONESIAN
268dcc86267SJeroen Ruigrok/asmodaiSWAHILI	SW	NEGRO-AFRICAN
269dcc86267SJeroen Ruigrok/asmodaiSWEDISH	SV	GERMANIC
270dcc86267SJeroen Ruigrok/asmodaiTAGALOG	TL	OCEANIC/INDONESIAN
271dcc86267SJeroen Ruigrok/asmodaiTAJIK	TG	IRANIAN
272dcc86267SJeroen Ruigrok/asmodaiTAMIL	TA	DRAVIDIAN
273dcc86267SJeroen Ruigrok/asmodaiTATAR	TT	TURKIC/ALTAIC
274dcc86267SJeroen Ruigrok/asmodaiTELUGU	TE	DRAVIDIAN
275dcc86267SJeroen Ruigrok/asmodaiTHAI	TH	ASIAN
276dcc86267SJeroen Ruigrok/asmodaiTIBETAN	BO	ASIAN
277dcc86267SJeroen Ruigrok/asmodaiTIGRINYA	TI	SEMITIC
278dcc86267SJeroen Ruigrok/asmodaiTONGA	TO	OCEANIC/INDONESIAN
279dcc86267SJeroen Ruigrok/asmodaiTSONGA	TS	NEGRO-AFRICAN
280dcc86267SJeroen Ruigrok/asmodaiTURKISH	TR	TURKIC/ALTAIC
281dcc86267SJeroen Ruigrok/asmodaiTURKMEN	TK	TURKIC/ALTAIC
282dcc86267SJeroen Ruigrok/asmodaiTWI	TW	NEGRO-AFRICAN
283dcc86267SJeroen Ruigrok/asmodaiUIGUR	UG
284dcc86267SJeroen Ruigrok/asmodaiUKRAINIAN	UK	SLAVIC
285dcc86267SJeroen Ruigrok/asmodaiURDU	UR	INDIAN
286dcc86267SJeroen Ruigrok/asmodaiUZBEK	UZ	TURKIC/ALTAIC
287dcc86267SJeroen Ruigrok/asmodaiVIETNAMESE	VI	ASIAN
288dcc86267SJeroen Ruigrok/asmodaiVOLAPUK	VO	INTERNATIONAL AUX.
289dcc86267SJeroen Ruigrok/asmodaiWELSH	CY	CELTIC
290dcc86267SJeroen Ruigrok/asmodaiWOLOF	WO	NEGRO-AFRICAN
291dcc86267SJeroen Ruigrok/asmodaiXHOSA	XH	NEGRO-AFRICAN
292dcc86267SJeroen Ruigrok/asmodaiYIDDISH	YI	GERMANIC
293dcc86267SJeroen Ruigrok/asmodaiYORUBA	YO	NEGRO-AFRICAN
294dcc86267SJeroen Ruigrok/asmodaiZHUANG	ZA
295dcc86267SJeroen Ruigrok/asmodaiZULU	ZU	NEGRO-AFRICAN
296dcc86267SJeroen Ruigrok/asmodai.ta
297dcc86267SJeroen Ruigrok/asmodai.fi
298dcc86267SJeroen Ruigrok/asmodai.Pp
299dcc86267SJeroen Ruigrok/asmodaiFor example, the locale for the Danish language spoken in Denmark
300dcc86267SJeroen Ruigrok/asmodaiusing the ISO8859-1 character set is da_DK.ISO8859-1.
301dcc86267SJeroen Ruigrok/asmodaiThe da stands for the Danish language and the DK stands for Denmark.
302dcc86267SJeroen Ruigrok/asmodaiThe short form of da_DK is sufficient to indicate this locale.
303dcc86267SJeroen Ruigrok/asmodai.Pp
304dcc86267SJeroen Ruigrok/asmodaiThe environment variable settings are queried by their priority level
305dcc86267SJeroen Ruigrok/asmodaiin the following manner:
306dcc86267SJeroen Ruigrok/asmodai.Pp
307dcc86267SJeroen Ruigrok/asmodai.Bl -bullet
308dcc86267SJeroen Ruigrok/asmodai.It
309dcc86267SJeroen Ruigrok/asmodaiIf the
310dcc86267SJeroen Ruigrok/asmodai.Ev LC_ALL
311dcc86267SJeroen Ruigrok/asmodaienvironment variable is set, all six categories use the locale it
312dcc86267SJeroen Ruigrok/asmodaispecifies.
313dcc86267SJeroen Ruigrok/asmodai.It
314dcc86267SJeroen Ruigrok/asmodaiIf the
315dcc86267SJeroen Ruigrok/asmodai.Ev LC_ALL
316dcc86267SJeroen Ruigrok/asmodaienvironment variable is not set, each individual category uses the
317dcc86267SJeroen Ruigrok/asmodailocale specified by its corresponding environment variable.
318dcc86267SJeroen Ruigrok/asmodai.It
319dcc86267SJeroen Ruigrok/asmodaiIf the
320dcc86267SJeroen Ruigrok/asmodai.Ev LC_ALL
321dcc86267SJeroen Ruigrok/asmodaienvironment variable is not set, and a value for a particular
322dcc86267SJeroen Ruigrok/asmodai.Ev LC_*
323dcc86267SJeroen Ruigrok/asmodaienvironment variable is not set, the value of the
324dcc86267SJeroen Ruigrok/asmodai.Ev LANG
325dcc86267SJeroen Ruigrok/asmodaienvironment variable specifies the default locale for all categories.
326dcc86267SJeroen Ruigrok/asmodaiOnly the
327dcc86267SJeroen Ruigrok/asmodai.Ev LANG
328dcc86267SJeroen Ruigrok/asmodaienvironment variable should be set in /etc/profile, since it makes it
329dcc86267SJeroen Ruigrok/asmodaimost easy for the user to override the system default using the individual
330dcc86267SJeroen Ruigrok/asmodai.Ev LC_*
331dcc86267SJeroen Ruigrok/asmodaivariables.
332dcc86267SJeroen Ruigrok/asmodai.It
333dcc86267SJeroen Ruigrok/asmodaiIf the
334dcc86267SJeroen Ruigrok/asmodai.Ev LC_ALL
335dcc86267SJeroen Ruigrok/asmodaienvironment variable is not set, a value for a particular
336dcc86267SJeroen Ruigrok/asmodai.Ev LC_*
337dcc86267SJeroen Ruigrok/asmodaienvironment variable is not set, and the value of the
338dcc86267SJeroen Ruigrok/asmodai.Ev LANG
339dcc86267SJeroen Ruigrok/asmodaienvironment variable is not set, the locale for that specific
340dcc86267SJeroen Ruigrok/asmodaicategory defaults to the C locale.
341dcc86267SJeroen Ruigrok/asmodaiThe C or POSIX locale assumes the 7-bit ASCII character set and defines
342dcc86267SJeroen Ruigrok/asmodaiinformation for the six categories.
343dcc86267SJeroen Ruigrok/asmodai.El
344dcc86267SJeroen Ruigrok/asmodai.Ss Character Sets
345dcc86267SJeroen Ruigrok/asmodaiA character is any symbol used for the organization, control, or
346dcc86267SJeroen Ruigrok/asmodairepresentation of data.
347dcc86267SJeroen Ruigrok/asmodaiA group of such symbols used to describe a
348dcc86267SJeroen Ruigrok/asmodaiparticular language make up a character set.
349dcc86267SJeroen Ruigrok/asmodaiIt is the encoding values in a character set that provide
350dcc86267SJeroen Ruigrok/asmodaithe interface between the system and its input and output devices.
351dcc86267SJeroen Ruigrok/asmodai.Pp
352dcc86267SJeroen Ruigrok/asmodaiThe following character sets are supported in
353dcc86267SJeroen Ruigrok/asmodai.Dx
354dcc86267SJeroen Ruigrok/asmodai.Bl -tag -width ISO8859_family
355dcc86267SJeroen Ruigrok/asmodai.It ISO8859 family
356dcc86267SJeroen Ruigrok/asmodaiIndustry-standard character sets are provided by means of the ISO8859
357dcc86267SJeroen Ruigrok/asmodaifamily of character sets, which provide a range of single-byte character set
358dcc86267SJeroen Ruigrok/asmodaisupport that includes Latin-1, Latin-2, Arabic, Cyrillic, Hebrew,
359dcc86267SJeroen Ruigrok/asmodaiGreek, and Turkish.
360dcc86267SJeroen Ruigrok/asmodaiThe eucJP character set is the industry-standard character set used to support
361dcc86267SJeroen Ruigrok/asmodaithe Japanese locale.
362dcc86267SJeroen Ruigrok/asmodai.It Unicode
363dcc86267SJeroen Ruigrok/asmodaiA Unicode environment based on the UTF-8 character set is supported for all
364dcc86267SJeroen Ruigrok/asmodaisupported language/territories.
365dcc86267SJeroen Ruigrok/asmodaiUTF-8 provides character support for most of the major languages of the
366dcc86267SJeroen Ruigrok/asmodaiworld and can be used in environments where multiple languages must be
367dcc86267SJeroen Ruigrok/asmodaiprocessed simultaneously.
368dcc86267SJeroen Ruigrok/asmodai.El
369dcc86267SJeroen Ruigrok/asmodai.Ss Font Sets
370dcc86267SJeroen Ruigrok/asmodaiA font set contains the glyphs to be displayed on the screen for a
371dcc86267SJeroen Ruigrok/asmodaicorresponding character in a character set.
372dcc86267SJeroen Ruigrok/asmodaiA display must support a suitable font to display a character set.
373dcc86267SJeroen Ruigrok/asmodaiIf suitable fonts are available to the X server, then X clients can
374dcc86267SJeroen Ruigrok/asmodaiinclude support for different character sets.
375dcc86267SJeroen Ruigrok/asmodai.Xr xterm 1
376dcc86267SJeroen Ruigrok/asmodaiincludes support for UTF-8 character sets.
377dcc86267SJeroen Ruigrok/asmodai.Xr xfd 1
378dcc86267SJeroen Ruigrok/asmodaiis useful for displaying all the characters in an X font.
379*dbd5a33cSSascha Wildner.Pp
380*dbd5a33cSSascha WildnerThe
381*dbd5a33cSSascha Wildner.Dx
382*dbd5a33cSSascha Wildner.Xr syscons 4
383*dbd5a33cSSascha Wildnerconsole provides support for loading a variety of fonts using the
384*dbd5a33cSSascha Wildner.Xr vidcontrol 8
385*dbd5a33cSSascha Wildnerutility. Available fonts can be found in
386*dbd5a33cSSascha Wildner.Pa /usr/share/syscons/fonts .
387dcc86267SJeroen Ruigrok/asmodai.Ss Internationalization for Programmers
388dcc86267SJeroen Ruigrok/asmodaiTo facilitate translations of messages into various languages and to
389dcc86267SJeroen Ruigrok/asmodaimake the translated messages available to the program based on a
390dcc86267SJeroen Ruigrok/asmodaiuser's locale, it is necessary to keep messages separate from the
391dcc86267SJeroen Ruigrok/asmodaiprograms and provide them in the form of message catalogs that a
392dcc86267SJeroen Ruigrok/asmodaiprogram can access at run time.
393dcc86267SJeroen Ruigrok/asmodai.Pp
394dcc86267SJeroen Ruigrok/asmodaiAccess to locale information is provided through the
395dcc86267SJeroen Ruigrok/asmodai.Xr setlocale 3
396dcc86267SJeroen Ruigrok/asmodaiand
397dcc86267SJeroen Ruigrok/asmodai.Xr nl_langinfo 3
398dcc86267SJeroen Ruigrok/asmodaiinterfaces.
399dcc86267SJeroen Ruigrok/asmodaiSee their respective man pages for further information.
400dcc86267SJeroen Ruigrok/asmodai.Pp
401dcc86267SJeroen Ruigrok/asmodaiMessage source files containing application messages are created by
402dcc86267SJeroen Ruigrok/asmodaithe programmer and converted to message catalogs.
403dcc86267SJeroen Ruigrok/asmodaiThese catalogs are used by the application to retrieve and display
404dcc86267SJeroen Ruigrok/asmodaimessages, as needed.
405dcc86267SJeroen Ruigrok/asmodai.Pp
406dcc86267SJeroen Ruigrok/asmodai.Dx
407dcc86267SJeroen Ruigrok/asmodaisupports two message catalog interfaces: the X/Open
408dcc86267SJeroen Ruigrok/asmodai.Xr catgets 3
409dcc86267SJeroen Ruigrok/asmodaiinterface and the Uniforum
410dcc86267SJeroen Ruigrok/asmodai.Xr gettext 3
411dcc86267SJeroen Ruigrok/asmodaiinterface.
412dcc86267SJeroen Ruigrok/asmodaiThe
413dcc86267SJeroen Ruigrok/asmodai.Xr catgets 3
414dcc86267SJeroen Ruigrok/asmodaiinterface has the advantage that it belongs to a standard which is
415dcc86267SJeroen Ruigrok/asmodaiwell supported.
416dcc86267SJeroen Ruigrok/asmodaiUnfortunately the interface is complicated to use and
417dcc86267SJeroen Ruigrok/asmodaimaintenance of the catalogs is difficult.
418dcc86267SJeroen Ruigrok/asmodaiThe implementation also doesn't support different character sets.
419dcc86267SJeroen Ruigrok/asmodaiThe
420dcc86267SJeroen Ruigrok/asmodai.Xr gettext 3
421dcc86267SJeroen Ruigrok/asmodaiinterface has not been standardized yet, however it is being supported
422dcc86267SJeroen Ruigrok/asmodaiby an increasing number of systems.
423dcc86267SJeroen Ruigrok/asmodaiIt also provides many additional tools which make programming and
424dcc86267SJeroen Ruigrok/asmodaicatalog maintenance much easier.
425dcc86267SJeroen Ruigrok/asmodai.Ss Support for Multibyte Characters and Wide Characters
426dcc86267SJeroen Ruigrok/asmodaiCharacter sets with multibyte characters may be difficult to decode, or may
427dcc86267SJeroen Ruigrok/asmodaicontain state (i.e., adjacent characters are dependent).
428dcc86267SJeroen Ruigrok/asmodaiISO C specifies a set of functions using 'wide characters' which can handle
429dcc86267SJeroen Ruigrok/asmodaimultibyte characters properly.
430dcc86267SJeroen Ruigrok/asmodaiA wide character is specified in ISO C
431dcc86267SJeroen Ruigrok/asmodaias being a fixed number of bits wide and is stateless.
432dcc86267SJeroen Ruigrok/asmodai.Pp
433dcc86267SJeroen Ruigrok/asmodaiThere are two types for wide characters:
434dcc86267SJeroen Ruigrok/asmodai.Em wchar_t
435dcc86267SJeroen Ruigrok/asmodaiand
436dcc86267SJeroen Ruigrok/asmodai.Em wint_t .
437dcc86267SJeroen Ruigrok/asmodai.Em wchar_t
438dcc86267SJeroen Ruigrok/asmodaiis a type which can contain one wide character and operates like 'char'
439dcc86267SJeroen Ruigrok/asmodaitype does for one character.
440dcc86267SJeroen Ruigrok/asmodai.Em wint_t
441dcc86267SJeroen Ruigrok/asmodaican contain one wide character or WEOF (wide EOF).
442dcc86267SJeroen Ruigrok/asmodai.Pp
443dcc86267SJeroen Ruigrok/asmodaiThere are functions that operate on
444dcc86267SJeroen Ruigrok/asmodai.Em wchar_t ,
445dcc86267SJeroen Ruigrok/asmodaiand substitute for functions operating on 'char'.
446dcc86267SJeroen Ruigrok/asmodaiSee
447dcc86267SJeroen Ruigrok/asmodai.Xr wmemchr 3
448dcc86267SJeroen Ruigrok/asmodaiand
449dcc86267SJeroen Ruigrok/asmodai.Xr towlower 3
450dcc86267SJeroen Ruigrok/asmodaifor details.
451dcc86267SJeroen Ruigrok/asmodaiThere are some additional functions that operate on
452dcc86267SJeroen Ruigrok/asmodai.Em wchar_t .
453dcc86267SJeroen Ruigrok/asmodaiSee
454dcc86267SJeroen Ruigrok/asmodai.Xr wctype 3
455dcc86267SJeroen Ruigrok/asmodaiand
456dcc86267SJeroen Ruigrok/asmodai.Xr wctran 3
457dcc86267SJeroen Ruigrok/asmodaifor details.
458dcc86267SJeroen Ruigrok/asmodai.Pp
459dcc86267SJeroen Ruigrok/asmodaiWide characters should be used for all I/O processing which may rely
460dcc86267SJeroen Ruigrok/asmodaion locale-specific strings.
461dcc86267SJeroen Ruigrok/asmodaiThe two primary issues requiring special use of wide characters are:
462dcc86267SJeroen Ruigrok/asmodai.Bl -bullet -offset indent
463dcc86267SJeroen Ruigrok/asmodai.It
464dcc86267SJeroen Ruigrok/asmodaiAll I/O is performed using multibyte characters.
465dcc86267SJeroen Ruigrok/asmodaiInput data is converted into wide characters immediately after
466dcc86267SJeroen Ruigrok/asmodaireading and data for output is converted from wide characters to
467dcc86267SJeroen Ruigrok/asmodaimultibyte characters immediately before writing.
468dcc86267SJeroen Ruigrok/asmodaiConversion is achieved using
469dcc86267SJeroen Ruigrok/asmodai.Xr mbstowcs 3 ,
470dcc86267SJeroen Ruigrok/asmodai.Xr mbsrtowcs 3 ,
471dcc86267SJeroen Ruigrok/asmodai.Xr wcstombs 3 ,
472dcc86267SJeroen Ruigrok/asmodai.Xr wcsrtombs 3 ,
473dcc86267SJeroen Ruigrok/asmodai.Xr mblen 3 ,
474dcc86267SJeroen Ruigrok/asmodai.Xr mbrlen 3 ,
475dcc86267SJeroen Ruigrok/asmodaiand
476dcc86267SJeroen Ruigrok/asmodai.Xr  mbsinit 3 .
477dcc86267SJeroen Ruigrok/asmodai.It
478dcc86267SJeroen Ruigrok/asmodaiWide characters are used directly for I/O, using
479dcc86267SJeroen Ruigrok/asmodai.Xr getwchar 3 ,
480dcc86267SJeroen Ruigrok/asmodai.Xr fgetwc 3 ,
481dcc86267SJeroen Ruigrok/asmodai.Xr getwc 3 ,
482dcc86267SJeroen Ruigrok/asmodai.Xr ungetwc 3 ,
483dcc86267SJeroen Ruigrok/asmodai.Xr fgetws 3 ,
484dcc86267SJeroen Ruigrok/asmodai.Xr putwchar 3 ,
485dcc86267SJeroen Ruigrok/asmodai.Xr fputwc 3 ,
486dcc86267SJeroen Ruigrok/asmodai.Xr putwc 3 ,
487dcc86267SJeroen Ruigrok/asmodaiand
488dcc86267SJeroen Ruigrok/asmodai.Xr fputws 3 .
489dcc86267SJeroen Ruigrok/asmodaiThey are also used for formatted I/O functions for wide characters
490dcc86267SJeroen Ruigrok/asmodaisuch as
491dcc86267SJeroen Ruigrok/asmodai.Xr fwscanf 3 ,
492dcc86267SJeroen Ruigrok/asmodai.Xr wscanf 3 ,
493dcc86267SJeroen Ruigrok/asmodai.Xr swscanf 3 ,
494dcc86267SJeroen Ruigrok/asmodai.Xr fwprintf 3 ,
495dcc86267SJeroen Ruigrok/asmodai.Xr wprintf 3 ,
496dcc86267SJeroen Ruigrok/asmodai.Xr swprintf 3 ,
497dcc86267SJeroen Ruigrok/asmodai.Xr vfwprintf 3 ,
498dcc86267SJeroen Ruigrok/asmodai.Xr vwprintf 3 ,
499dcc86267SJeroen Ruigrok/asmodaiand
500dcc86267SJeroen Ruigrok/asmodai.Xr vswprintf 3 ,
501dcc86267SJeroen Ruigrok/asmodaiand wide character identifier of %lc, %C, %ls, %S for conventional
502dcc86267SJeroen Ruigrok/asmodaiformatted I/O functions.
503dcc86267SJeroen Ruigrok/asmodai.El
504dcc86267SJeroen Ruigrok/asmodai.Sh SEE ALSO
505dcc86267SJeroen Ruigrok/asmodai.Xr gencat 1 ,
506dcc86267SJeroen Ruigrok/asmodai.Xr xfd 1 ,
507dcc86267SJeroen Ruigrok/asmodai.Xr xterm 1 ,
508dcc86267SJeroen Ruigrok/asmodai.Xr catgets 3 ,
509dcc86267SJeroen Ruigrok/asmodai.Xr gettext 3 ,
510dcc86267SJeroen Ruigrok/asmodai.Xr nl_langinfo 3 ,
511dcc86267SJeroen Ruigrok/asmodai.Xr setlocale 3 ,
512dcc86267SJeroen Ruigrok/asmodai.Xr wsfontload 8
513dcc86267SJeroen Ruigrok/asmodai.Sh BUGS
514dcc86267SJeroen Ruigrok/asmodaiThis man page is incomplete.
515