Skip Navigation Links | |
Exit Print View | |
![]() |
man pages section 1M: System Administration Commands Oracle Solaris 10 1/13 Information Library |
- query and configure locales
localeadm [-lcst] [-q locale | region] [-h] [-d device]...
localeadm -r locale | region [-t] [-v] [-m] [-R root_path]
localeadm -a locale | region [-t] [-v] [-m] [-d device]... [-R root_path]
localeadm -f locale | region [-t] [-v] [-m] [-d device]... [-R root_path]
localeadm -h
localeadm -C
The localeadm utility queries and configures Solaris locales through a command line interface.
In query (-q) or list (-l) modes, localeadm displays information about locale packages that are installed on the system or that reside on a particular device or directory.
To make it easier for users to pick out locales, the output from localeadm consists of a list of country or region names rather than a list of packages. Users can use the output to determine which locales or regions to add or remove.
When the user specifies a locale or region to add or remove using the name given by the output of the list mode, localeadm calculates which locale packages need to be changed and add or remove them. localeadm uses pkgadd(1M) or pkgrm(1M) to add or remove packages.
If the locales changed were Asian locales, then extra processes such as input method server daemons might need to be started before the new locales work properly. Once the locales are installed, the user is prompted to either reboot the machine or manually start the daemons. The user is also given a list of daemons which need to be started.
All locales are part of a set geographic region. A locale is an indivisible part of a region. You cannot have a locale which doesn't exist in a region, or a region without locales. If you choose to add or remove a particular locale, all of the locales in the region to which it belongs will be added or removed. Likewise, if you query a locale, localeadm checks the system for the region of which the local is part.
The following options are supported:
Add the packages for locale (locale) or geographic region region to the system.
Specify locale or region as the short name displayed by the -l option. For example, the -l option outputs Australasia (aua), therefore, the argument for -a is aua.
This option requires the -d option with arguments. If necessary packages are already installed, localeadm does not overwrite them. It simply skips such packages.
If you use the -a and -m options with a locale that has already been added without desktop translated message packages, it adds the desktop translated message packages for that locale to the system.
Only superusers or others who have been assigned package administration access through role-based access control can use this option. See rbac(5) for information on adding and removing packages. See smc(1M) for information on setting up and adding users to a package manager role.
Display the locale name with codeset in locale(1) format.
Use this option in conjunction with the -l option to display the locale name with codeset in the format shown by the locale(1) command. For example, it displays fr_FR.ISO8859-1 as opposed to french.
Enable user to recreate the Locale_config file based on the images available to them. This attempts to ensure that any inaccuracies (more likely for non-GA versions) in the bundled configuration file are addressed.
Note - If you install a patch that contains a new Locale_config file, a subsequent running of localeadm with the -C option overwrites the new file and produces incorrect output. If you wish to preserve the contents of a Locale_config file, in whole or in part, create a copy of that file, stored in a location that will be unaffected by a patch.
Install or list locales from packages located in device. Specify device as a full path name to a directory containing Solaris packages or the path to the top directory of a complete Solaris image. You can also specify device as a device alias such as /cdrom/cdrom0, a device nickname as defined by eject(1), or an alternative device nickname such as cdrom, dvd or dvdrom. If the packages are to be installed from a series of CDROM images, then multiple images can be specified in a comma separated list. The same device or nickname can be repeated to indicate multiple loadings of different media at the same device.
Check the pkgs modified by a previous add or remove operation to ensure all pkgs were added or removed properly. If a pkg was incorrectly added due to a pkgadd or pkgrm failure, the pkg is backed out and reinstalled.
Only superusers or others who have been assigned package administration access through role-based access control can use this option. See rbac(5) for information on adding and removing packages. See smc(1M) for information on setting up and adding users to a package manager role.
Print a short help message. The help message lists all the flags and their usage.
List all the locales that are installed on the system or available on an install media. The list is sorted by geographic region.
When you specify the -d option with -l, localeadm lists all of the locales or regions available on the device pointed to by the -d option arguments.
When you do not specify the -d option, localeadm -l lists all of the locales or regions installed on the current system.
When you specify the -t option with -l, localeadm lists all of the locales or regions that could possibly be added to the system.
Deselect translated message packages.
By default, with the -a option, localeadm adds the translated desktop message packages for the locale or region specified in the -a option argument. If you use the -a option with the -m option, the desktop translated message packages for the locale or region will not be added, thus effectively disabling the desktop translated messages support for that locale or region. If used with the -r option, localeadm will remove only the translated desktop message packages for the locale or region specified in the -r option argument.
If you use the -m option with a locale that has already been added without the translated desktop message packages it adds the translated desktop message packages for that locale to the system.
Query the system to see if the locale (locale) or geographic region region are already installed. The expected input for a locale or region name is the name displayed by the -l option.
Remove the packages for locale (locale) or geographic region (region) from the system.
Specify locale or region as the short name displayed by the -l option. For example, the -l option outputs Australasia (aua), therefore, the argument for -a is aua.
Only superusers or others who have been assigned package administration access through role-based access control can use this option. See rbac(5) for information on adding and removing packages. See smc(1M) for information on setting up and adding users to a package manager role.
localeadm -r might not remove certain packages if the package table is updated or restored by a patching operation. If a localeadm -r command fails for a given package, you must use pkgrm(1M) to manually remove that package.
Define the full path name of a directory to use as the root path. All files, including package system information files, are relocated to a directory tree starting in the specified root_path. You can specify root_path when you install to a client from a server.
Note - The root file system of any non-global zones must not be referenced with the -R option. Doing so might damage the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. See zones(5).
Display only the geographic regions of specific locales or regions.
Use this option in conjunction with the -l option to display listed regions or locales.
Test mode.
Use this option with -a, -f or -r to list all operations to be done. It will not actually add or remove packages.
Use the this option with -l to list all of the locales or regions that could possibly be added to the system.
Print out messages produced during a pkgadd or pkgrm command.
This option works on localeadm add and remove commands. It does not work on individual pkgadd or pkgrm commands. It displays additional information, but only as part of the larger program.
Example 1 Listing All of the Locales and Codesets
The following example lists all of the geographic regions installed on the machine. All locales in the regions are listed by their codesets:
example% localeadm -lc
Example 2 Listing the Regions Available on a Solaris CD or DVD
The following example command checks the Solaris_10/Product directory of the CD or DVD mounted on /cdrom/cdrom0. It also lists the names of the regions that can be installed from packages in that directory. The -s option displays the region names without any locales.
example% localeadm -ls -d /cdrom/cdrom0
Example 3 Querying for a Locale
The following example queries whether the Central European region called ceu on the current machine.
example% localeadm -q ceu
Example 4 Removing Western European Locales
The following example removes all packages associated with the Western Europe region from the system, except for those packages needed by other regions.
example% localeadm -r weu
Example 5 Adding Russian Locales
The following example installs the Eastern Europe region, of which Russian locale is a part, from packages located in /net/sparc_images/export/pkgs.
example# localeadm -a ru_RU -d /net/sparc_images/export/pkgs
Example 6 Adding the Traditional Chinese Locale
The following example adds the Traditional Chinese region to the system. This differs from the previous example in that Traditional Chinese is installed as a geographic region rather than just a locale. This is the case for all Asian languages, for example, zh_TW, zh_CN, zh_HK, hi_IN, th_TH, ko_KR, ja.
# localeadm -a zh_TW -d /net/sparc_images/export/pkgs
The following exit values are returned when you invoke localeadmin without the -q (query) option:
Successful completion.
An error occurred.
The following exit values are returned when you invoke localeadmin with the -q (query) option:
Successful search. The locale or region was found.
Unsuccessful search. The locale or region was not found.
An error occurred.
Log files for installation and removal operations.
date is specified in YYYY_MM_DD format. If a particular day has multiple installs, date has a period (.) followed by a number appended to it, for example, 2003_10_20.1, 2003_10_20.2.
File that contains the output of the -l option.
See attributes(5) for descriptions of the following attributes:
|
eject(1), locale(1), pkgadd(1M), pkgrm(1M), smc(1M), attributes(5), rbac(5)