A message file is plain text, read line by line. Every line is one of three things:

  • an empty line — blanks, a # comment, or nothing;
  • a directive — a $ followed by a keyword: $MODULE, $LANGUAGE, $STRING, …;
  • a line that belongs to the message above it — a parameter, a language header or a text line.
# greetings.msg — a complete message file
$MODULE greetings
$NAMESPACE app
$LANGUAGE en
$STRING ENABLE

$MESSAGE Welcome
@ user std::string const &
"Welcome, {$user}!"
[tr]
"Hoş geldin, {$user}!"

$MESSAGE Welcome opens a message; the @ line declares its parameter; the quoted lines are its text in English and — after the [tr] header — in Turkish. The next directive, or the end of the file, closes it.

Keywords and case

Directive and option keywords are case-insensitive: $MESSAGE, $message and $Message are the same, and so are ENABLE and enable. Everything you name — messages, parameters, classes, namespaces — keeps its case, because it becomes C++.

Where to go next

ConstructPage
blank lines, comments, line endsLines & Comments
$MODULE, $NAMESPACE, $INCLUDE, $IMPORT, $USING, $EXPORT, $LANGUAGEDirectives
$STRING, $STREAMABLE, $ERROR, $EXCEPTION, $THROW, $SYSLOGArtefact Directives
$MESSAGE, @, [language], '…', "…", `\…`Messages
identifiers, qualified names, language namesNames
every rule on one pageGrammar summary

These pages are the syntax. What each directive does, and the C++ it produces, is the Reference Manual.