[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    localedef(1) manual page Table of Contents

Name

localedef - define locale environment

Synopsis

localedef [-c] [-f charmap] [-i sourcefile] localename

Availability

SUNWcsu

Description

The localedef utility converts source definitions for locale categories into a format usable by the functions and utilities whose operational behaviour is determined by the setting of the locale environment variables; see environ(5) .

The utility reads source definitions for one or more locale categories belonging to the same locale from the file named in the -i option (if specified) or from standard input.

Each category source definition is identified by the corresponding environment variable name and terminated by an END category-name statement. The following categories are supported.

LC_CTYPE
Defines character classification and case conversion.
LC_COLLATE
Defines collation rules.
LC_MONETARY
Defines the format and symbols used in formatting of monetary information.
LC_NUMERIC
Defines the decimal delimiter, grouping and grouping symbol for non-monetary numeric editing.
LC_TIME
Defines the format and content of date and time information.
LC_MESSAGES
Defines the format and values of affirmative and negative responses.

Options

The following options are supported:
-c
Create permanent output even if warning messages have been issued.
-f charmap
Specify the pathname of a file containing a mapping of character symbols and collating element symbols to actual character encodings. This option must be specified if symbolic names (other than collating symbols defined in a collating-symbol keyword) are used. If the -f option is not present, the default character mapping will be used.
-i sourcefile
The path name of a file containing the source definitions. If this option is not present, source definitions will be read from standard input.

Operands

The following operand is supported:
localename
Identifies the locale. If the name contains one or more slash characters, localename will be interpreted as a path name where the created locale definitions will be stored. This capability may be restricted to users with appropriate privileges. (As a consequence of specifying one localename, although several categories can be processed in one execution, only categories belonging to the same locale can be processed.)

Output

For each locale category specified in localename, localedef will create the following files:

CategoryFileDescription
LC_CTYPElocalename.chrtblbinary data containing character classification information
localename.chrtbl.cC language source file, to be used by programmers as needed
localename.charmapcharacter mapping file
LC_COLLATElocalename.collatecollation information used by runtime collation library routines
localename.collate.hashhashed collation information
LC_MESSAGESlocalename.message.msgbinary message catalogue file used by nl_langinfo()
localename.messagesource message catalogue file
LC_NUMERIClocalename.numericbinary numeric information for numeric category
LC_TIMElocalename.timetext file containing information used by strftime() and nl_langinfo()
LC_MONETARYlocalename.monetarybinary monetary information used by strftime() and nl_langinfo()

The files created by localedef should be renamed as follows:

localename.chrtbl
/usr/lib/locale/locale/LC_CTYPE /ctype
localename.charmap
/usr/lib/locale/locale/LC_CTYPE /charmap
localename.collate
/usr/lib/locale/locale/LC_COLLATE /CollTable
localename.collate.hash
/usr/lib/locale/locale/LC_COLLATE /CollTable.hash
localename.message.msg
/usr/lib/locale/locale/LC_MESSAGES /SUNW_OST_LINFO
localename.numeric
/usr/lib/locale/locale/LC_NUMERIC /numeric
localename.time
/usr/lib/locale/locale/LC_TIME
/time

Environment

See environ(5) for definitions of the following environment variables that affect the execution of localedef: LC_CTYPE , LC_MESSAGES , and NLSPATH .

Exit Status

The following exit values are returned:
  1. No errors occurred and the locales were successfully created.
  2. Warnings occurred and the locales were successfully created.
  3. The locale specification exceeded implementation limits or the coded character set or sets used were not supported by the implementation, and no locale was created.
  4. The capability to create new locales is not supported by the implementation.
    >3
    Warnings or errors occurred and no output was created.

    If an error is detected, no permanent output will be created.

    See Also

    locale(1) , nl_langinfo(3C) , strftime(3C) , charmap(5) , environ(5) , locale(5)

    Warnings

    If warnings occur, permanent output will be created if the -c option was specified. The following conditions will cause warning messages to be issued:


    Table of Contents