summaryrefslogtreecommitdiffstats
path: root/adv_cmds/localedef/localedef.1
blob: c8f39070e7bc5e3adbc352522d9d09d1c5bb47fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
.Dd September 9, 2004
.Dt LOCALEDEF 1
.Os Darwin
.Sh NAME
.Nm localedef
.Nd define locale environment
.Sh SYNOPSIS
.Nm
.Op Fl c
.Op Fl f Ar charmap
.Op Fl i Ar sourcefile
.Ar name
." localedef [-c][-f charmap][-i sourcefile] name
.Sh DESCRIPTION
The 
.Nm
utility reads source definitions for one or more locale categories
belonging to the same locale from the file named in the
.Fl i
option (if specified) or from standard input.
.Pp
The
.Ar name
operand identifies the target locale. The
.Nm
utility supports
the creation of public, or generally accessible locales, as well
as private, or restricted-access locales.
.Pp
Each category source definition is identified by the corresponding
environment variable name and terminated by an END category-name
statement.
.Pp
.Bl -tag -width "LC_MONETARY" -compact -offset indent
.It LC_CTYPE
Defines character classification and case conversion.
.It LC_COLLATE
Defines collation rules.
.It LC_MONETARY
Defines the format and symbols used in formatting of monetary information.
.It LC_NUMERIC
Defines the decimal delimiter, grouping, and grouping symbol for non-monetary numeric editing.
.It LC_TIME
Defines the format and content of date and time information.
.It LC_MESSAGES
Defines the format and values of affirmative and negative responses.
.El
.Sh OPTIONS
The following options are supported:
.Pp
.Bl -tag -width -indent
.It Fl c
Create permanent output even if warning messages have been issued.
.It Fl f Ar charmap
Specify the pathname of a file containing a mapping of character symbols and collating element symbols to actual character encodings.
.It Fl i Ar sourcefile
The pathname of a file containing the source definitions. If this option is not present, source definitions will be read from standard input.
.El
.Sh OPERANDS
The following operand is supported:
.Bl -tag -width -indent
.It Ar name
Identifies the locale.
If the name contains one or more slash characters,
.Ar name
will be interpreted as a pathname
where the created locale definitions will be stored.
If
.Ar name
does not contain any slash characters,
the locale will be public.
This capability is restricted to users with appropriate privileges.
(As a consequence of specifying one name,
although several categories can be processed in one execution,
only categories belonging to the same locale can be processed.)
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm :
.Bl -tag -width "LC_COLLATE"
.It Ev LANG
Provide a default value for the internationalization variables
that are unset or null.
If LANG is unset or null,
the corresponding value from the implementation-dependent default locale
will be used.
If any of the internationalization variables contains an invalid setting,
the utility will behave as if none of the variables had been defined.
.It Ev LC_ALL
If set to a non-empty string value, override the values of all the other internationalization variables.
.It Ev LC_COLLATE
(This variable has no effect on
.Nm ;
the POSIX locale will be used for this category.)
.It Ev LC_CTYPE
Determine the locale for the interpretation of sequences of bytes
of text data as characters
(for example, single- as opposed to multi-byte characters
in arguments and input files).
This variable has no effect on the processing of
.Nm
input data;
the POSIX locale is used for this purpose,
regardless of the value of this variable.
.It Ev LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.
.It Ev NLSPATH
Determine the location of message catalogues for the processing of LC_MESSAGES.
.El
.Sh EXIT STATUS
The following exit values are returned:
.Bl -tag -width -indent
.It 0
No errors occurred and the locales were successfully created.
.It 1
Warnings occurred and the locales were successfully created.
.It 2
The locale specification exceeded implementation limits or the coded character set or sets used were not supported by the implementation, and no locale was created.
.It >2
Warnings or errors occurred and no output was created.
.El