| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- customize and build new locales
/usr/bin/localectr
/usr/bin/localectr-llocale1,locale2... [-ddestination_path] [-ccompiler_path] [-r 0 | 1 | 2] [-ipkginfo_template] [-ppkgname_prefix]
/usr/bin/localectr-h
/usr/bin/localectr-q
/usr/bin/localectr-V
Thelocalectr utility allows new locales to be customized and built. Theoutput oflocalectr is an installable package containing the compiled shared objectbinary which contains the locale data information as well as a numberof other supporting files that are required to have a fully working localeon the system.
Once generated, the package can be added to the system by usingthepkgadd(1M) command and removed withpkgrm(1M).
Depending on your default system login, you might have to reset youruser environment after you add a locale. Ifdtlogin(1X) (for the CDEuser environment) is the default system login, you need to restartdtlogin.No action is required ifgdm(1) (for the Gnome user environment) is thedefault login.
There are two interfaces tolocalectr, command line (CLI) and graphical userinterface (GUI). To customize the locale data, you must use the GUI.To create locales with standard locale data according to Unicode's Common LocaleData Repository (CLDR), the CLI is sufficient.
With the CLI it is also possible to generate several locales ina single step, with a separate package being generated for each locale.With the GUI, a single locale is processed at a time.
To launch the GUI, run thelocalectr command with no options. Torun from the CLI, use the appropriate options as described below.
localectr uses thelocaledef(1) utility to build the locale data binary sharedobject. Therefore, access to a C compiler is required in order torunlocalectr successfully, as this is also required bylocaledef.
localectr is mainly concerned with locale data. However, in order to createa fully working locale on the system withlocalectr, many features, suchas fonts, translations and input methods, are also required. Depending on whatlocales are already installed on the system, the relevant features might or mightnot be present on the system.localectr bundles locale data for thelatest set of locales available in Unicode's CLDR. A user can alsocreate a locale not available in CLDR by supplying her own datain thelocalectr GUI.
The following options are supported:
Specify the path to the C compiler that is used to compile the locale data into a shared object binary. Not required if the compiler is already in the user'sPATH.
Specify the path to the directory where the created package is to be stored.
Displays the usage message.
The full path to user definedpkginfo(4) template file.
Specify a comma-separated list of locale(s) to generate. Locale names are in the form:locale.codeset@variant, wherecodeset andvariant are optional. The default and only allowedcodeset isUTF-8. The defaultvariant islocalectr.
The package name prefix
Querieslocalectr for a complete list of locales for which locale data is defined inlocalectr. Whenlocalectr is run from the CLI, the locale(s) specified with the-l option must be on this list in order for an installable locale package to be generated.
Specify the range of Unicode characters for which locale data rules in theLC_CTYPE andLC_COLLATE categories are to be generated. There are three valid options:
Locale data rules are restricted to the exemplar or to commonly used characters of the locale in question.
Locale data rules are restricted to the Unicode plane 0 characters, whose codepoints fall in the rangeu0000-uFFFF.
Locale data rules are generated for all codepoints defined in the latest version of Unicode that is supported by the system on whichlocalectr is being run.
Shows the version of this software.
Example 1 Launching the GUI
The following example launches thelocalectr GUI.
example%localectr
Example 2 Generating Locale for Afrikaans (South Africa) with Default Locale Data
The following example generates a package in the specified destination directory, whichcan be used to install the Afrikaans (af_ZA.UTF-8) locale on the system.The package name is composed of a prefix followed by the hyphenseparated ISO-639 language code, the ISO-3166 country code, the locale encoding and anoptional user-defined tag. The resulting package can then be added to thesystem usingpkgadd(1M).
example%localectr -l af_ZA -d /tmp
Example 3 Generating Several South Africa Locales with Full Unicode Range of Characters
The following example generates an installable package for each of the specifiedlocales.
example%localectr -l af_ZA,en_ZA,xh_ZA,zu_ZA -d /tmp -r 2
Example 4 Generating the Irish Locale with a User-Specified Tag
The following example will generate a locale whose full name isga_IE.UTF-8@mycompanyname.
example%localectr -l ga_IE@mycompanyname -d /tmp
The following exit codes are returned:
Successful completion
An error occurred.
Wrapper script that launches locale creator.
Jar files, scripts, and locale data repository needed to run the application.
Seeattributes(5) for descriptions of the following attributes:
|
Interface stability is Committed for command-line options and is Uncommitted for otherinterfaces.
locale(1),localedef(1),pkgadd(1M),pkgrm(1M),pkginfo(4),attributes(5)
dtlogin(1X),gdm(1)(these are not SunOS man pages)
International Language Environments Guide
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |