LC_MESSAGES Category for the Locale Definition Source File Format

Purpose

Defines the format for affirmative and negative system responses.

Description

The LC_MESSAGES category of a locale definition source file defines the format for affirmative and negative system responses. This category begins with an LC_MESSAGES category header and terminates with an END LC_MESSAGES category trailer.

All operands for the LC_MESSAGES category are defined as strings or extended regular expressions enclosed by " " (double-quotation marks). These operands are separated from the keyword they define by one or more blanks. Two adjacent " " (double-quotation marks) indicate an undefined value. The following keywords are recognized in the LC_MESSAGES category:

Item Description
copy Specifies the name of an existing locale to be used as the definition of this category. If a copy statement is included in the file, no other keyword can be specified.
yesexpr Specifies an extended regular expression that describes the acceptable affirmative response to a question expecting an affirmative or negative response.
noexpr Specifies an extended regular expression that describes the acceptable negative response to a question expecting an affirmative or negative response.
yesstr A colon-separated string of acceptable affirmative responses. This string is accessible to applications through the nl_langinfo subroutine as nl_langinfo (YESSTR).
nostr A colon-separated string of acceptable negative responses. This string is accessible to applications through the nl_langinfo subroutine as nl_langinfo (NOSTR).

Examples

The following is an example of a possible LC_MESSAGES category listed in a locale definition source file:

LC_MESSAGES
#
yesexpr "([yY][[:alpha:]]*)|(OK)"
noexpr           "[nN][[:alpha:]]*"
yesstr           "Y:y:yes"
nostr            "N:n:no"
#
END LC_MESSAGES

Files

Item Description
/usr/lib/nls/loc/* Specifies locale definition source files for supported locales.
/usr/lib/nls/charmap/* Specifies character set description (charmap) source files for supported locales.