Files: message file (.mes)

Description

Message file format.

Creation

Fire genmess utility.

Type

Binary

Notes

Message files provide a means whereby text displayed by Fire can be centralized and/or internationalized, thus providing both easy maintenance and painless language switching.

Message files are divided into sets, arbitrarily categorized by the author. One set might contain error messages, another might contain prompts, and so on. Sets are numbered starting from 1, and messages are numbered within each set.

Single-language (version 1) or multi-language (version 2) message files may be created.

Fire itself uses a messages file for the display of all system text.

Application macros running within Fire may declare a user messages file and access text within it by indexing rows.

Message files are binary files, created by the genmess utility from data in a source text file, so that Fire can access text within them quickly.

Source Data

The data in a messages source data file comprises set declarations and message text. The sets should be in numerical order, as should the messages within each set.

Lines beginning with a # are treated as comment lines. Blank lines are ignored.

The maximum number of sets is 60. The maximum number of messages per set is 100.

By convention, message source files have the extension .dat, and the message binary files have the extension .mes.

Where different languages need to be accommodated, a message file can be declared multi-language by a $languages directive, followed by the languages which are to be used, for example you may want a message file with English, French and Italian vesions of messages. The language codes following the $language statement should be those accepted by international locales, e.g. en_us (American English), fr (French), fr_ca (Canadian French) etc.

In a multi-language message file, all numbered messages are assumed to be in the first language declared. Language alternatives follow, each preceded by its language code. See the second example below. If a message has no value for a particular language, a default can be declared, otherwise the value for the first language is used.

Example Source File

A single-language message file:

# mymess.dat. Two sets, five messages per set.
$SET 1
# Error messages.
1 Doing this has no effect.
2 This page has been intentionally left blank.
3 Memory parity error. Call your supplier.
4 The power cord has dropped out.
5 Please read the manual.
$SET 2
# Prompts.
1 Give your name.
2 Give your phone number.
3 Give your inside leg measurement.
4 Give the name of your lawyer.
5 Give your lawyer's hourly rate.

A multi-language message file:

# international.dat. One set of 3 messages.
$languages
# Default language: American English
   en_us
# UK English
   en_gb
# Australian English (use UK english for its default)
   en_au(en_gb)
# French
   fr
# Italian
   it
$set 1
1. Good morning.
   en_aus. G'day
   fr. Bonjour
   it. Bon giorno
2. Favorites
   en_gb. Favourites
   fr. Favoris
   it. Favoritti
3. A coat of many colors
   en_gb. A coat of many colours
   fr. Un manteau de beaucoup de couleurs
   it. Un cappotto di molti colori

See Also

Functions:

sm (string), um (string)

Identifiers:

sys_message_file (string), user_message_file (string)

Utilities:

genmess