United States-English |
|
|
HP-UX Reference > Llocaledef(1M)HP-UX 11i Version 3: February 2007 |
|
NAMElocaledef — generate a locale environment SYNOPSISlocaledef [-cenvw] [-C compiler_options] [-L loader_options] [-m method_file] [-f charmap_file] [-i locale_definition] [-u code_set_name] locale_name DESCRIPTIONThe localedef command sets up the language environment for the named locale. The localedef command reads a locale definition file (see localedef(4) for a detailed description) from standard input (default) or from locale_definition file, creates a locale file with the same name as specified for the locale_name parameter, and optionally installs this locale in the appropriate directory. Installation of public locales (those accessible to all users) requires appropriate privileges. Creation of locales (both private and public) requires access to the ANSI C compiler. OptionsThe localedef command recognizes the following options:
The following is a brief description of the components that make up a locale. For a complete description of the form and syntax of a locale definition file, see localedef(4). For a complete description of the form and effects of a charmap file, see charmap(4). Six categories of data in the locale_name file are recognized by setlocale(), and make up a language definition:
A locale definition file also consists of six categories. The beginning of each category is identified by a category tag having the form LC_category where category is one of the following: CTYPE, COLLATE, MONETARY, NUMERIC, TIME, or MESSAGES. The end of each category is identified by a tag consisting of the word END followed by a space and the category identifier; for example, END LC_COLLATE. Categories can appear in any order in the locale definition file. At least one category specifications is required. If a category is not specified, setlocale() sets up the default "C" locale for that category (see setlocale(3C) and lang(5)). Each category is composed of one or more statements. Each statement begins with a keyword followed by one or more expressions. An expression is a set of well-formed metacharacters, strings, and constants. The localedef command also recognizes comments and separators. More than one definition specified for each category constitutes a hard error (causes the localedef command to exit without generating a locale). Any category can be specified by the keyword copy followed by the name of a valid locale. This causes the information for the category to be identical to that in the named locale. Note that the copy keyword, if used for a category, must be the first and only keyword following the category tag. A methods file is used to create locales for user-specific character encoding schemes. Operating System RequirementsFor cross platform development and development on a 64-bit operating system several requirements must be observed. Both the 32-bit and 64-bit method libraries must exist. In the case of the 64-bit shared library it must be in the directory ../hpux64 ( or pa20_64 in case of PA-RISC systems) under the location where the 32-bit library is located. When the -e option is specified, or when executing on a 64-bit operating system, the resulting locale is placed in the directory hpux64 (pa20_64 in case of PA-RISC systems) under the current working directory unless the install option has been specified. NotesA locale built for one system cannot be used on other systems. Users will not be able to generate PA-RISC locales on Itanium®-based systems. When the -u option is used, the code_set_name option argument is interpreted as a name of a codeset to which the ISO/IEC 10646-1:2000 standard position constant values (Unicode scalar values) are converted. Both the Unicode scalar values (via the "\u" character constants) and other formats (decimal, hexadecimal, or octal) are valid as encoding values within the charmap file. The codeset can be any codeset that is supported by the iconv_open() function on the system. When conflicts occur between the charmap specification of code_set_name, or mb_cur_max and the corresponding value for the codeset represented by the -u option argument code_set_name, the localedef command fails with an error. If the LC_MONETARY keywords int_p_cs_precedes, int_n_cs_precedes, int_p_sep_by_space, int_n_sep_by_space, int_p_sign_posn, and int_n_sign_posn are not specified in the locale source, the values of the keywords p_cs_precedes, n_cs_precedes, p_sep_by_space, n_sep_by_space, p_sign_posn, and n_sign_posn will be used respectively for formatting monetary quantities with international currency symbols. EXTERNAL INFLUENCESEnvironment VariablesLANG determines the locale to use when neither LC_ALL or the other category variables specify a locale. LC_ALL determines locale to be used. It overrides any values specified by LANG or any other LC_* variables. LC_COLLATE and LC_CTYPE have no effect on the processing of the localedef command, which behaves as if these two variables were set to the C locale. LC_MESSAGES determines the language in which messages are displayed. RETURN VALUEThe localedef command returns the following values:
FILES FOR PA-RISC SYSTEMS/usr/lib/nls/loc/src /usr/lib/nls/loc/charmaps /usr/lib/nls/loc/methods /usr/lib/nls/loc/pa20_64/methods /usr/lib/nls/loc/locales/language[_territory][.codeset] /usr/lib/nls/loc/pa20_64/locales/language[_territory][.codeset] FILES FOR ITANIUM-BASED SYSTEMSIn addition to the PA-RISC files, the following files are present on Itanium-based systems. /usr/lib/nls/loc/hpux32/src /usr/lib/nls/loc/hpux64/src /usr/lib/nls/loc/hpux32/charmaps /usr/lib/nls/loc/hpux64/charmaps /usr/lib/nls/loc/hpux32/methods /usr/lib/nls/loc/hpux64/methods /usr/lib/nls/loc/hpux32/locales/language[_territory][.codeset] /usr/lib/nls/loc/hpux64/locales/language[_territory][.codeset] |
Printable version | ||
|