1localectr(1M) System Administration Commands localectr(1M)
2
3
4
6 localectr - customize and build new locales
7
9 /usr/bin/localectr
10
11
12 /usr/bin/localectr -l locale1,locale2... [-d destination_path]
13 [-c compiler_path] [-r 0 | 1 | 2] [-i pkginfo_template]
14 [-p pkgname_prefix]
15
16
17 /usr/bin/localectr -h
18
19
20 /usr/bin/localectr -q
21
22
23 /usr/bin/localectr -V
24
25
27 The localectr utility allows new locales to be customized and built.
28 The output of localectr is an installable package containing the com‐
29 piled shared object binary which contains the locale data information
30 as well as a number of other supporting files that are required to have
31 a fully working locale on the system.
32
33
34 Once generated, the package can be added to the system by using the
35 pkgadd(1M) command and removed with pkgrm(1M).
36
37
38 Depending on your default system login, you might have to reset your
39 user environment after you add a locale. If dtlogin(1X) (for the CDE
40 user environment) is the default system login, you need to restart
41 dtlogin. No action is required if gdm(1) (for the Gnome user environ‐
42 ment) is the default login.
43
44
45 There are two interfaces to localectr, command line (CLI) and graphical
46 user interface (GUI). To customize the locale data, you must use the
47 GUI. To create locales with standard locale data according to Unicode's
48 Common Locale Data Repository (CLDR), the CLI is sufficient.
49
50
51 With the CLI it is also possible to generate several locales in a sin‐
52 gle step, with a separate package being generated for each locale. With
53 the GUI, a single locale is processed at a time.
54
55
56 To launch the GUI, run the localectr command with no options. To run
57 from the CLI, use the appropriate options as described below.
58
59
60 localectr uses the localedef(1) utility to build the locale data binary
61 shared object. Therefore, access to a C compiler is required in order
62 to run localectr successfully, as this is also required by localedef.
63
64
65 localectr is mainly concerned with locale data. However, in order to
66 create a fully working locale on the system with localectr, many fea‐
67 tures, such as fonts, translations and input methods, are also
68 required. Depending on what locales are already installed on the sys‐
69 tem, the relevant features might or might not be present on the system.
70 If they are not present, then localeadm(1M) should be used to add the
71 relevant packages before adding packages created by localectr.
72 localectr bundles locale data for the latest set of locales available
73 in Unicode's CLDR. A user can also create a locale not available in
74 CLDR by supplying her own data in the localectr GUI.
75
77 The following options are supported:
78
79 -c compiler_path
80
81 Specify the path to the C compiler that is used to compile the
82 locale data into a shared object binary. Not required if the com‐
83 piler is already in the user's PATH.
84
85
86 -d destination_path
87
88 Specify the path to the directory where the created package is to
89 be stored.
90
91
92 -h
93
94 Displays the usage message.
95
96
97 -i template_file
98
99 The full path to user defined pkginfo(4) template file.
100
101
102 -l locale1,locale2...
103
104 Specify a comma-separated list of locale(s) to generate. Locale
105 names are in the form: locale.codeset@variant, where codeset and
106 variant are optional. The default and only allowed codeset is
107 UTF-8. The default variant is localectr.
108
109
110 -p
111
112 The package name prefix
113
114
115 -q
116
117 Queries localectr for a complete list of locales for which locale
118 data is defined in localectr. When localectr is run from the CLI,
119 the locale(s) specified with the -l option must be on this list in
120 order for an installable locale package to be generated.
121
122
123 -r
124
125 Specify the range of Unicode characters for which locale data rules
126 in the LC_CTYPE and LC_COLLATE categories are to be generated.
127 There are three valid options:
128
129 0
130
131 Locale data rules are restricted to the exemplar or to commonly
132 used characters of the locale in question.
133
134
135 1
136
137 Locale data rules are restricted to the Unicode plane 0 char‐
138 acters, whose codepoints fall in the range u0000-uFFFF.
139
140
141 2
142
143 Locale data rules are generated for all codepoints defined in
144 the latest version of Unicode that is supported by the system
145 on which localectr is being run.
146
147
148
149 -V
150
151 Shows the version of this software.
152
153
155 Example 1 Launching the GUI
156
157
158 The following example launches the localectr GUI.
159
160
161 example% localectr
162
163
164
165 Example 2 Generating Locale for Afrikaans (South Africa) with Default
166 Locale Data
167
168
169 The following example generates a package in the specified destination
170 directory, which can be used to install the Afrikaans (af_ZA.UTF-8)
171 locale on the system. The package name is composed of a prefix followed
172 by the hyphen separated ISO-639 language code, the ISO-3166 country
173 code, the locale encoding and an optional user-defined tag. The result‐
174 ing package can then be added to the system using pkgadd(1M).
175
176
177 example% localectr -l af_ZA -d /tmp
178
179
180
181 Example 3 Generating Several South Africa Locales with Full Unicode
182 Range of Characters
183
184
185 The following example generates an installable package for each of the
186 specified locales.
187
188
189 example% localectr -l af_ZA,en_ZA,xh_ZA,zu_ZA -d /tmp -r 2
190
191
192
193 Example 4 Generating the Irish Locale with a User-Specified Tag
194
195
196 The following example will generate a locale whose full name is
197 ga_IE.UTF-8@mycompanyname.
198
199
200 example% localectr -l ga_IE@mycompanyname -d /tmp
201
202
203
205 The following exit codes are returned:
206
207 0
208
209 Successful completion
210
211
212 >0
213
214 An error occurred.
215
216
218 /usr/bin/localectr
219
220 Wrapper script that launches locale creator.
221
222
223 /usr/lib/localectr
224
225 Jar files, scripts, and locale data repository needed to run the
226 application.
227
228
230 See attributes(5) for descriptions of the following attributes:
231
232
233
234
235 ┌─────────────────────────────┬─────────────────────────────┐
236 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
237 ├─────────────────────────────┼─────────────────────────────┤
238 │Availability │SUNWlocalecreator │
239 ├─────────────────────────────┼─────────────────────────────┤
240 │Interface Stability │See below. │
241 └─────────────────────────────┴─────────────────────────────┘
242
243
244 Interface stability is Committed for command-line options and is Uncom‐
245 mitted for other interfaces.
246
248 locale(1), localedef(1), localeadm(1M), pkgadd(1M), pkgrm(1M),
249 pkginfo(4), attributes(5)
250
251
252 dtlogin(1X), gdm(1)(these are not SunOS man pages)
253
254
255 International Language Environments Guide
256
257
258
259SunOS 5.11 7 Sep 2007 localectr(1M)