In locale source files, each locale category source definition consists of a block of lines. These lines contain the following sections, in order:
category header
The category header consists
of the keyword naming the category. Each category name starts
with the characters LC_. VisualAge C++ supports the following
category names:
The LC_TOD and LC_SYNTAX categories, if present, must be the last two categories in the locale definition file.
category body
The body of a category
definition consists of one or more lines describing the
components of the category. Each component line has the following
format:
<identifier> <operand1> <identifier> <operand1>;<operand2>;...;<operandN>
<identifier> is a keyword that identifies a locale element, or a symbolic name that identifies a collating element. <operand> is a character, collating element, or string literal. Escape sequences can be specified in a string literal using the <escape_character>. If multiple operands are specified, they must be separated by semicolons. White space can be before and after the semicolons.
category trailer
The category trailer consists of the keyword END
followed by one or more <blank>s and the category name of
the corresponding category header.
Example
Here is an example of locale source containing the
header, body, and trailer:
# Here is a simple locale definition file consisting of one # category source definition, LC_CTYPE. LC_CTYPE upper <A>;...;<Z> END LC_CTYPE
The copy keyword
In each category the keyword copy followed by a string specifies
the name of an existing locale to be used as the source for the
definition of this category. The compiler searches for a
specified existing locale as follows:
If the locale is not found, an error is reported and no locale output is created.
![]()
Internationalization
Localization
and Locales
