The <messages> Element

The <messages> element is the root element of a message file, and it groups all other elements together. The messages element has the following attribute:

Table 1. Attributes of the messages Element

Attribute Name

Required

Default

Description

package

Yes

None

The Java package name to use for the generated Java file.

The <message> Element

The <message> element groups a number of <locale> elements together. The message element has the following attributes:

Table 2. Attributes of the message Element

Attribute Name

Required

Default

Description

name

Yes

None

Uniquely identifies the message.

removed

No

false

Set to true to indicate if the message is to be removed and hence not included in the generated artefacts.

The <locale> Element

The <locale> element details the text of the message for one of the supported locales. Since the message files are XML, it is not necessary to use Java escape characters. Special characters can be inserted by using the XML entity references in the message files. These will be converted to the actual characters in the properties file. For example &#162; and &#36; will result in the cent and dollar symbols, respectively, being put in the properties file. Care must be taken to only specify characters that can be supported by the target properties file on your platform and for your operating system locale.

The locale element has the following attributes:

Table 3. Attributes of the locale Element

Attribute Name

Required

Default

Description

language

Yes

None

To be included during generation of the message artefacts each <locale> element must specify a language (and optional country) attribute that corresponds to a supported locale. The SERVER_LOCALE_LIST environment variable is a comma separated list defining the set of locales that are supported, where the locale is either simply language or language_country. For example: SERVER_LOCALE_LIST=en, en_US, en_GB.

country

No

None

Set to the country relevant to the locale language attribute.