Message Files

Traditionally message files or catalogs are binary files used for holding text messages associated with an application. Each message catalog had a one-to-one association with a symbol definition file. The symbol definition file was examined at compile time and the message catalog at run-time. Using this form of indirection allows an application to be localized without a re-compilation being necessary.

In keeping with this approach, Cúram message catalogs are generated from message .xml files using a command-line build utility called msggen (build msggen). Generating from a message .xml file produces two outputs: a message catalog file (one Java .properties file is generated for each locale specified) and a symbol definition file (a standard Java class file). The symbol definition file is a Java file containing constants (in Java terms, a constant is a static final) for message identifiers enumerated in the message. xml file, and the name of the message file itself. This file should be imported into any Java source files which use that catalog. The message catalog is a properties file opened by the Cúram application at runtime.

The msggen build target performs the merge of message files and then translates the resultant message file (which are stored in /build/svr/message/scp) into symbol definition (Java code) and message catalog (property) files.

msggen is automatically invoked by the provided build scripts, against those message files which are placed in the suggested source locations, i.e., the /message directory of a component.