The POSIX locale model divides locale-dependent information into six locale categories that assist in the development of internationalized applications. Each locale category controls the behavior of a predefined set of operations and is associated with a particular locale. Locale categories are represented by symbolic constants describing their function and are prefixed by LC_. The locale categories defined by the POSIX model are listed in the following figure, along with a brief description of the responsibilities and functions controlled by each category.Each locale category controls the behavior of a predefined set of operations and ensures that the operations under its control behave properly for the locale associated with the category. For example, the LC_COLLATE category maintains information pertinent to string sorting, and, if configured for the U.S. English locale, ensures that strings are sorted according the rules for U.S. English.Locale categories function independently within an application and need not be associated with the same locale. For example, it is possible for an application to format monetary quantities according to the rules for U.S. English and to display messages in French by setting the LC_MONETARY and LC_MESSAGES categories appropriately.
|