nlsadm get-console-keymap | get-system-locale [-e <locale-environment >] | get-timezone
nlsadm list-console-keymap | list-locale [-aH] [-o < property>[,...]] [property= value[,...]] | list-timezone
nlsadm set-console-keymap [ -f] <keymap> | set-system-locale [-f] [-e < locale-environment>] <locale> | set-timezone [-f] <timezone >
nlsadm install-locale [-fnv ] [-R <dir>] < locale> [...] uninstall-locale [-fnv] [-R < dir>] <locale> [...]
nlsadm -? [subcommand]
The nlsadm utility provides a way to get and set information on specific national language properties. This utility provides a consolidated and convenient way to administer language support features.
The get subcommands gather information on national language properties set in the corresponding SMF service for the given property. It also displays the required information according to the selected input options, in the standard output.
The list subcommands provide information about all supported locales either installed or available for installation. The printed information can be altered by using various options, for example, to include the localized strings for locale names, to print only locales for a given language, to suppress headers, and so on. The list subcommands also provide lists of all supported national language properties such as console-keymaps, timezones, and so on.
The set subcommands set the value of national language properties by modifying the value of the corresponding SMF services for a given national language property such as default system locale, console keymap or timezone.
The install/uninstall locale subcommands install or uninstall necessary packages and set corresponding facets for a given locale.
To set the values of national language properties and to install/uninstall locales, an administrator needs to be granted with the National Languages Support Management rights.
The following option is supported:
Displays help information. This option stops further argument processing and successfully exits after displaying the appropriate output.
The following options are supported for the get subcommands:
Shows the value of the console keymap currently set in the system.
Prints the default system locale currently set in the system. If <locale-environment> is not specified, all locale environments are displayed.
Displays the system locale of the specified environment. The supported values for <locale-environment> are: LANG, LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES and LC_ALL.
Displays the name of the default system timezone set in the system.
The following options are supported for the list subcommands:
Shows a list of all supported console keymaps available in the system.
Displays a list of available locales. By default only the locales available in the installed packages are shown in the list. Unless –o option is specified, the default property fields are: locale, lang, territory, codeset, modifier and flags. By default the output is shown in columns and headers with property field names are printed.
The output contains not only locales available in the installed packages but it also contains all locales available for installation from IPS package repositories. This could take several minutes depending on the availability of the IPS repositories configured.
Does not show headers and displays the output in 'ofmt' format (colon-separated format with backslashes in front of colons and backslashes in the data). This format is useful for scripting mode.
Prints only the specified output fields. Valid <property> values are: codeset, facet, flags, lang, lang_wx[_YZ], locale, modifier, pkg, territory, territory_wx[_YZ], and timezone. lang_wx[_YZ] and territory_wx[_YZ], report the name of the language or territory written in the specified locale where wx is an ISO 639 two-letter code (for example, en) and YZ is an ISO 3166 two-letter code (for example, US). When the localized string is not found for the given language or territory, a minus sign '-' is returned.
The flags column contains a set of flags that indicates the status of the locale:
A c in the flags column indicates that the locale is the current locale.
An i in the flags column indicates that the locale is installed.
An l in the flags column indicates that the locale is a legacy locale.
An s in the flags column indicates that the locale is currently set as the default system locale.
The <property> arguments should be presented as a comma-separated list without spaces.
Filters the output and only displays information that matches the input property value. For example, it is possible to specify a concrete territory value, and the output in that case will show only locales for the given territory. Valid <property> specifiers are: codeset, facet, flags, lang, locale, modifier, pkg, territory, and timezone.
Valid lang value is an ISO 639 two-letter code (for example, en) and valid territory value is an ISO 3166 two-letter code (for example, US).
Shows a list of all supported timezones. The list includes also timezones of the locales available for installation.
The following options are supported for the set subcommands:
Sets the given console keymap in the system.
Force setting a non-valid or unknown value.
Sets the default system locale to given value. Unless –e option is specified, only the LANG environment is set to the given locale.
Force setting a non-valid or unknown value.
Sets the given locale only to the specified locale-environment. The supported values for <locale-environment> are: LANG, LC_CTYPE, LC_NUMERIC, LC_TIME, LC_COLLATE, LC_MONETARY, LC_MESSAGES, and LC_ALL.
Sets the system's timezone to the given value.
Force setting a non-valid or unknown value.
The following options are supported for the install/uninstall subcommands:
Installs or uninstalls necessary packages for the given locale. If additional packages or locales need to be installed or uninstalled because of locales or package dependencies, the command reports a list of additional packages and/or locales to install or uninstall. If –-force option is used, the additional packages and locales are also installed or uninstalled.
Perform a trial run of the operation with no package changes made.
Issue verbose progress messages during the requested operation and display detailed information such as commands used to install/unistall locales or to change facets.
Operate on the image rooted at dir. If no directory was specified or determined based on environment, the default is /. See the "Environment Variables" section from pkg(1) for more information.
On successful completion.
When an error is found.
The following command show the the default system locale currently set in the locale environment LC_TIME:
$ nlsadm get-system-locale -e LC_TIMEExample 2 Set System Timezone to Europe/Paris
The following command shows how to set the system Timezone to Europe/Paris:
$ nlsadm set-timezone Europe/ParisExample 3 Show the Name of the Default Timezone Currently set in the System
The following command shows the name of the default timezone currently set in the system:
$ nlsadm get-timezoneExample 4 Show a List of all Supported Locales Either Installed or Available for Installation
The following command shows a list of all supported locales either installed or available for installation:
$ nlsadm list-locale -aExample 5 Show a List of all Installed Locales According to Specified Fields and do not Show Headers
The following command shows a list of all installed locales according to specified fields and do not show headers:
$ nlsadm list-locale -o locale,lang,timezone -HExample 6 Set the Default System Locale to fr_FR.UTF-8
The following command shows how to set the default system locale to fr_FR.UTF-8:
$ nlsadm set-system-locale fr_FR.UTF-8Example 7 Set the LC_CTYPE locale-environment to en_US.UTF-8
The following command sets the LC_CTYPE locale-environment to en_US.UTF-8:
$ nlsadm set-system-locale -e LC_CTYPE en_US.UTF-8Example 8 Set Console Keyboard Keymap to UK-English
The following command sets the Console Keyboard keymap to UK-English:
$ nlsadm set-console-keymap UK-EnglishExample 9 Install fr_FR.UTF-8 Locale in the System
The following command shows how to install fr_FR.UTF-8 locale in the system:
$ nlsadm install-locale fr_FR.UTF-8Example 10 Show Information on a Given Locale
The following command shows information on a given locale by displaying only specified property fields and omitting headers:
$ nlsadm list-locale -o locale,lang,territory -H locale=en_US.UTF-8Example 11 Set Empty Value as Default System Locale
The following command shows how to set the default system locale with an empty value:
$ nlsadm set-system-locale ""
See attributes(5) for descriptions of the following attributes:
The values for the console-keymap, system-locale and timezone are managed through the service management facility, smf(5), under the service identifiers:
svc:/system/keymap:default (console-keymap) svc:/system/environment:init (system-locale) svc:/system/timezone:default (timezone)