locale(1)locale(1)

NAME

locale - get locale-speci®c (NLS) information

SYNOPSIS

locale [ -a [ 32 64 ] ⏐ -A ⏐ -m ]

locale [ -ck ] name ...

DESCRIPTION

The locale command displays information about the current locale or about available locales.

When invoked without arguments, locale displays the name and actual or implied value of each of the locale-related environment variables in the order shown below, one per line:

LANG

LC_CTYPE

LC_COLLATE

LC_MONETARY

LC_NUMERIC

LC_TIME

LC_MESSAGES

LC_ALL

An actual value is the value the variable actually has in the user's environment. An implied value is derived from the value of another variable. Implied values are displayed enclosed in double quotes, while actual values are unquoted.

The determination of implied values is that if the variable LC_ALL is present and has a non-null value, that is the actual value for LC_ALL, and all of the other variables take its value as an implied value. If LC_ALL is not set, all of the LC_* variables that are set are shown with their value as an actual value. Any that have no value are shown with the value of the LANG environment variable as their implied value. LC_ALL is displayed as LC_ALL=\n if it has no value.

The locale command can take multiple arguments, which may be locale category names, locale key- words, or the special word charmap (see localedef(1M) for a description of locale keywords and charmaps). If an argument is a keyword, the value associated with that keyword in the current environment is displayed and possibly other information, depending on selected options. If an argument is a category name (i.e., LC_*), the values of all keywords de®ned in that category are displayed. If an argument is the special word charmap, the charmap ®le (if any) that was used in the de®nition of the current locale is displayed.

Non-printable characters are printed as hexadecimal values in the form,

\xhh

except that if a different escape character has been de®ned for the locale, it is displayed instead of the "\".

Options

The following options are available:

-a

List all available locales. These are the possible meaningful values that can be assigned to

 

LANG or any of the LC_* variables on the system. They are dependent upon which locales

 

have been installed on the system. By default on a 32-bit system, the locales in

 

/usr/lib/nls/loc/locales are listed. By default on a 64-bit system, the locales in

 

/usr/lib/nls/loc/pa20_64/locales are listed. This option takes 32 (for ILP32,

 

32-bit int, long, pointer, 32-bit offset) or 64 (for LP64, 64-bit long, pointer, 64-bit offset) as

 

its argument.

 

 

 

-a

Display 32-bit locales for 32-bit and 64-bit systems.

 

 

-a 32

Display 32-bit locales for 32-bit and 64-bit systems.

 

 

-a 64

Display only 64-bit locales on a 64-bit system. If executed on a 32-bit system, an

 

 

error message is returned.

 

-A

List 32-bit locales on a 32-bit system. List both 32-bit and 64-bit bit locales on a 64-bit sys-

 

tem.

 

 

 

-m

Display a list of available charmap ®les on the system. See localedef(1M) for a de®nition of

 

charmap ®les and their usage.

 

 

HP-UX Release 11i: December 2000

− 1 −

Section 1−455

l