The Java artefacts (symbol definition and message catalog files) produced from a merged message file, are placed in the / build/svr/message/gen/<package> directory, where <package> is the package attribute specified in the message file. For example, package="curam.message" would result in the Java artefacts being placed in the / build/svr/message/gen/curam/message directory.
The directory contains the Java files (which are locale independent) and the property files (which are locale dependent) which are named <Message File name>_<specific language>_<specific country>.properties.
These artefacts are best illustrated by example:
package curam.message; import curam.util.message.CatEntry; import curam.util.message.MessageCatalog public final class SampleMessages { private static final MessageCatalog kCat = new MessageCatalog("curam.message.SampleMessages"); /** * BpoActivity:ERR_SAMPLE_VALIDATION_MSG * en_UK = The specified colour is not valid. * en_US = The specified color is not valid. */ public static final CatEntry ERR_SAMPLE_VALIDATION_MSG = kCat.entry("ERR_SAMPLE_VALIDATION_MSG"); /** * BpoActivity:ERR_SAMPLE_ERROR_MSG * en_US = An external resource is not available. */ public static final CatEntry ERR_SAMPLE_ERROR_MSG = kCat.entry("ERR_SAMPLE_ERROR_MSG"); /** * BpoActivity:ERR_SAMPLE_NEW_MSG * en_GB = An example of localisation. */ public static final CatEntry ERR_SAMPLE_NEW_MSG = kCat.entry("ERR_SAMPLE_NEW_MSG"); }
ERR_SAMPLE_VALIDATION_MSG=The specified colour is not valid. ERR_SAMPLE_NEW_MSG=An example of localisation.
At the end of the msggen step these property files are placed into a .jar file which is used by the client to localize the messages that are returned to it.