The default system locale is the locale in which the system will boot and run. In earlier releases of Oracle Solaris, the default system locale was configured in the /etc/default/init file. You can use the nlsadm command with the get-system-locale, list-locale, and set-system-locale subcommands. For more information, see the nlsadm(8) man page.
To display the current default system locale, use the get-system-locale command,
$ nlsadm get-system-locale LANG=en_US.UTF-8 LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_ALL=
To list available system locales:
# nlsadm list-locale
To set the default system locale, use the set-system-locale command. For example, to set the default locale to fr_FR.UTF-8:
# nlsadm set-system-locale fr_FR.UTF-8
The initial default system locale is set during the installation. The Oracle Solaris installer is localized, so speakers of any of the core languages can navigate through the installation using their native tongue. Only the ten core languages are available.
This language selection also determines the default language support and other data formats for the installed system.
Regardless of the default setting, all ten core locales are installed and available to users. You can change the default through the Automated Installer to broaden or narrow the language scope.
You can customize Automated Installer manifests to alter the locale, keyboard, and timezone preferences.
The selection of locales to be installed is controlled by facets in the AI manifest. The <software><image> element contains the element facet, which has the following syntax:
<facet set="true|false">facet-name</facet>
The following sample manifest uses the facet elements to make sure that only the German (in Germany) and English (in the United States) locales and translations are installed on the target system.
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance auto_reboot="true" name="ai-german"> ... <software type="IPS"> <destination> <image> <!-- deselect all locales --> <facet set="false">facet.locale.*</facet> <!-- specify specific locales to install --> <!-- install German and English only --> <facet set="true">facet.locale.de</facet> <facet set="true">facet.locale.de_DE</facet> <facet set="true">facet.locale.en</facet> <facet set="true">facet.locale.en_US</facet> </image> </destination> ... </software> </ai_instance> </auto_install>
You can obtain a list of available locale facets from the system/locale package by issuing a command similar to the following example:
$ pkg contents -m system/locale | ggrep -o facet.locale.[^\ ]* | sort -u
<software_data action="install"> <name>pkg:/group/system/solaris-minimal-server</name> <name>pkg:/system/locale</name> </software_data>
For more information about manifest creation, see the ai_manifest(5) man page.