WASD Hypertext Services - Technical Overview

10 - Message Configuration

10.1 - Behaviour
10.2 - Message File Format
10.3 - Supplied Message Files
[next] [previous] [contents] [full-page]

Message configuration is provided for two purposes.

  1. Some sites would prefer to customize or extend the basic information provided to clients when an error or other event occurs.

  2. Sites that do not use English as a first language may wish to provide some or all of the defined messages using a prefered language.

Not all messages provided by the WASD server are customizable, only those generated for non-administrative content. As the WASD server can also report using information derived from the standard VMS message service (via sys$getmsg()) it is assumed a language-local implementation of this is in use as well. Unfortunately for the non-first-language-English Web and system administrators, the menus and messages used for administration purposes, etc., are still only in English. The intent of this facility is to provide non-administration clients only with a more familiar language environment.

Also note that the message database only applies to messages generated by the server, not to any generated by scripts, etc.


10.1 - Behaviour

When an error, or other message or string, needs to be provided for the client the message database is accesssed using the following algorithm.

  1. If the client request has specified a list of prefered languages using the "Accept-Language:" HTTP header field the message database is checked for support of that/those languages. If one is found then that language is used to access the message.

  2. If none is found, or the client has not specified a prefered language, the client host address is checked against any list of hosts/domains provided against the language (see below). If a match occurs the specified language is used.

  3. If neither of the above results in a message language the base language is used (the highest numbered language). This must have a complete set of messages or the server will not start!


10.2 - Message File Format

By default, the system-table logical name HTTPD$MSG locates a common message file, unless an individual message file is specified using a job-table logical name. Simple editing of the message file changes the messages (after a server restart, of course). Comment lines may be included by prefixing them with the hash character ("#"), and lines continued by ensuring the last character is a backslash ("\"). The server will concurrently support an additional 3 languages to the base English (although this can be increased by recompilation :^)

NOTE

Care must be taken with the message file or the server may refuse to start!
Worst-case; the HTTPD$MSG.CONF message file may be copied from [EXAMPLE].

As illustrated below the message file comprises a series of sections. Directives enclosed by square-brackets provide information to the message loader.

  # this is a comment
 
  [version]   8.0
  [language]  1  es,es-ES,es-AR  hosts=*.es,*.ar
  [language]  2  de,de-*         hosts=*.de,*.at
  [language]  3  en
 
  [general]
 
  en 01 Sanity check failure.
  de 01 (the same message but in German, which I cannot speak :^)
  es 01 (the same message but in Spanish, which I also cannot speak :^)
  en 02 String overflow.
  de 02 (the same message but in German, which I cannot speak :^)
  es 01 (the same message but in Spanish, \
  which I still cannot speak :^) \
  this has also been continued over two additional lines!
  en 03 Heap allocation failed.
  en 04 calloc() failed
  en 05 Request calloc() failed.
  en 06 Server too busy.
  en 07 Server access denied.
  en 08 Facility is disabled.
  en 09 Wildcard not permitted.
  en 10 Directory layout problem.
 
  [next-section, etc.]
The square-bracketed section headings have the following functions.

The base language (the highest numbered, which should always be English) must have precisely the right number of messages required by the server, too few or too many and the server will not start! Additional languages do not have to reassign every message! The base language will supply any not assigned. A message number of zero is disabled and completely ignored.

If messages contain HTML tags that markup must not interfere with the general HTML page it is used within.

Some messages are a composite of multiple strings each of which is used on a different part of the one page (e.g. for the [upd] edit-page). Each of the strings is delimited by the vertical bar "|". Care must be taken when customizing these strings that the overall number stays the same and that the length of each does not become excessive. Although it will not disrupt the server it may significantly disrupt the page layout.

All message numbers must be included. To provide an empty string for any one message (not recommended) provide the line with nothing following the message number.


10.3 - Supplied Message Files

Any non-English message files that are provided to the author will be included for general use (please take the time to support this endeavour) in the HT_ROOT:[EXAMPLE] directory.

Note that message files can become out-of-date as server versions change, requiring modifications to the message database. Check the version information and/or comments at the top of candidate message files, however even slightly dated files may serve as a good starting point for a locale-specific message base.


[next] [previous] [contents] [full-page]