Converts locale and character set description (charmap) source files to produce a locale database.
localedef [ -c ] [ -f Charmap ] [ -i SourceFile ] [-L LinkOptions ] [ -m MethodFile ] LocaleName
The localedef command converts source files that contain definitions of locale-dependent information (such as collation, date and time formats, and character properties) into a locale object file used at run-time. The locale object file created by the localedef command is then used by commands and subroutines that set the locale with the setlocale subroutine.
The -i SourceFile flag and variable specify the file that contains the source category definitions. If the -i flag is not specified, the file is read from standard input.
The -f CharMap flag and variable specify a file that maps character symbols to actual character encodings. Using the -f flag allows one locale source definition to be applicable to more than one code set. If the -f flag is not specified, the default value for the CharMap variable is ISO8859-1.
The LocaleName parameter specifies the locale name for the locale database generated by the localedef command from the specified source files. The LocaleName parameter can be either an absolute path name for the file location or a relative path name.
If a locale category source definition contains a copy statement and the statement names an existing locale installed in the system, the localedef command proceeds as though the source definition contained the valid category source definition for the named locale.
Notes:
If an error is detected, no permanent output is created.
If warnings occur, permanent output is created when the -c flag is specified. The following conditions cause warning messages to be issued:
-c | Forces the creation of locale tables even if warning messages have been issued. |
-f CharMap | Specifies the name of a file containing a mapping of character symbols and collating element symbols to actual character encodings. A locale is associated with one and only one code set. If this flag is not specified, the ISO 8859-1 code set is assumed.
Note: The use of certain system-provided CharMap files is fully supported. However, while correctly defined user-provided CharMap files may work properly, the result of such use is not guaranteed. |
-i SourceFile | Specifies the path name of a file containing the locale category source definitions. If this flag is not present, source definitions are read from standard input. |
-L LinkOptions | Passes the specified link options to the ld command used to build the locale. |
-m MethodFile | Specifies the name of a method file that describes the methods to be overridden when constructing a locale. The localedef command reads the method file and uses entry points when constructing the locale objects. The code set methods specified are also used in parsing the file pointed to by the CharMap variable. |
LocaleName | Specifies the name of the locale to be created. This is the name that can subsequently be used to access this locale information. |
The localedef command returns the following exit values:
localedef -c Austin
localedef -i Austin.src Austin
localedef -f IBM-850 -i Austin.src Austin
The ld command, locale command.
The setlocale subroutine.
Character Set Description (charmap) Source File Format, Locale Definition Source File Format and Method Source File Format in AIX Version 4.3 Files Reference.
For specific information about the locale categories and their keywords, see the LC_COLLATE category, LC_CTYPE category, LC_MESSAGES category, LC_MONETARY category, LC_NUMERIC category, and LC_TIME category for the locale definition source file format in AIX Version 4.3 Files Reference.
Locale Overview for System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.
National Language Support Overview for System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.