Go to main content

International Language Environments Guide for Oracle® Solaris 11.3

Exit Print View

Updated: December 2018
 
 

Adding or Removing Locales by Using nlsadm

You can use the install-locale, list-locale, and uninstall-locale subcommands of the nlsadm command to administer locales and manage national language properties. For more information, see the nlsadm(1M) man page.

To install a locale and any available translations, use the install-locale subcommand. For example, to install the Danish locale, you would use the following command:

# nlsadm install-locale da_DK.UTF-8

To list the locales available for installation based on the current image, use the list-locale command.

$ nlsadm list-locale
LOCALE            LANG  TERRITORY  CODESET  MODIFIER  FLAGS  
af_ZA.UTF-8        af    ZA         UTF-8    -         -      
...

On a default installation, this command lists only the locales available from the installed packages. More locales are available in the package repository, which you can display by using the –a option.

$ nlsadm list-locale -a
Reading package information from IPS publisher's repository (it could take couple of minutes) ...
LOCALE             LANG  TERRITORY  CODESET  MODIFIER  FLAGS  
af_ZA.UTF-8         af    ZA         UTF-8      -        -      
...

To uninstall a locale (Danish) and all related translations, use the following command:

# nlsadm uninstall-locale da_DK.UTF-8

Note -  Due to the structure of packaging, sometimes the requested locale changes cannot be made and additional locales will be installed or removed as a side-effect. In such cases, the nlsadm command will provide a solution with minimal impact and inform you about the additional changes needed before committing them.