[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
[0140]
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
[0149]
[0150]
[0151]
[0152]
[0153]
[0154]
[0155]
[0156]
[0157]
[0158]
[0159]
[0160]
[0161]
[0162]
[0163]
[0164]
[0165]
[0166]
[0167]
[0168]
[0169]
[0170]
[0171]
[0172]
[0173]
[0174]
[0175]
[0176]
[0177]
[0178]
[0179]
[0180]
[0181]
[0182]
[0183]
[0184]
[0185]
[0186]
[0187]
[0188]
[0189]
[0190]
[0191]
[0192]
[0193]
[0194]
[0195]
[0196]
[0197]
[0198]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204]
[0205]
[0206]
[0207]
[0208]
[0209]
[0210]
[0211]
[0212]
[0213]
[0214]
[0215]
[0216]
[0217]
[0218]
[0219]
[0220]
[0221]
[0222]
[0223]
[0224]
[0225]
[0226]
[0227]
[0228]
[0229]
[0230]
[0231]
[0232]
[0233]
[0234]
[0235]
[0236]
[0237]
[0238]
[0239]
[0240]
[0241]
[0242]
[0243]
[0244]
[0245]
[0246]
[0247]
[0248]
[0249]
[0250]
[0251]
[0252]
[0253]
[0254]
[0255]
[0256]
[0257]
[0258]
[0259]
[0260]
[0261]
[0262]
[0263]
[0264]
[0265]
[0266]
[0267]
[0268]
[0269]
[0270]
[0271]
[0272]
[0273]
[0274]
[0275]
[0276]
[0277]
[0278]
[0279]
[0280]
[0281]
[0282]
[0283]
[0284]
[0285]
[0286]
[0287]
[0288]
[0289]
[0290]
[0291]
[0292]
[0293]
[0294]
[0295]
[0296]
[0297]
[0298]
[0299]
[0300]
[0301]
[0302]
[0303]
[0304]
|1Message Configuration||

|^ By default, the logical name |*WASD_CONFIG_MSG| locates the global message
configuration file.  A text editor may be used to modify this configuration
file.  Changes require a server restart to put them into effect. 

|^ Message configuration is provided for two purposes.

|number|

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

|item| 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.

|!number|

|^ 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.

|^ Changes to the message configuration file can be validated at the
command-line before restart.  This detects and reports any syntactical and 
fatal configuration errors but of course cannot check the |/intent| of the
rules.

|code|
$ HTTPD /DO=MSG=CHECK
|!code|

|2Behaviour|

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

|number|

|item| 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.

|item| 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.

|item| 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!

|!number|

|2Message File Format|

|^ By default, the system-table logical name WASD_CONFIG_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 |'_smiley|\ |

|note><|
|*Care must be taken with the message file or the server may refuse to start!||
|^-Worst-case; the WASD_CONFIG_MSG.CONF message file may be copied from
[EXAMPLE].
|!note|

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

|code|
# this is a comment

[version]   9.0
[language]  1  en

[general]

en 01 Sanity check failure.
en 02 String overflow.
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.]
|!code|

|^ The square-bracketed section headings have the following functions.

|bullet|

|item| |*.[version] |-| | Ensures the correct database version is available for
the server version attempting to use it. The message file always needs checking
for this version number being changed at server updates, although the version
may remain fixed at a previous server version number if there have been no
changes to the message database during subsequent server versions. This must be
the first directive in the file.

|item| |*.[language] |-| | Creates space for assigning the new language's
messages. The number specifies an order within the languages, each must be
different, but only the lowest and highest (prefered and base respectively)
have operational significance. The highest number should always be English to
provide a fall-back message. A short string provides an identifier for the
language. This identifier should be the same as the identifying string in the
browser request "Accept-Language:" header field (e.g. "en", "se", "de", "fr",
etc.)  Multiple, comma-separated languages may be specified.  The first is the
primary language of that list and messages must be specified using that.  The
subsequent languages are equivalents that might be specified by the client.  A
wildcard may be used to match all possibilities (e.g. "de,de-*", "es,es-*"). 
Following the language identifier  is an optional host/domain list. Multiple
hosts/domains may be specified by separating each with a comma. The
specifications may contain wildcards.  All the [language] directives should be
grouped at the start of the file immediately following the [version] directive.
A character set may be associated with a particular language by specifying a
|/charset=| following the language string (e.g. "ru charset=koi8-r").  Setting
the language's ordering number to zero disables the language completely.  All
messages associated with it will then be ignored.

|item| |*.[group-name] |-| | The messages are divided into groupings to make
them easier to manage.  Each group begins with the group name directive.

|item| |*en 01 message |-| | Each message in a group is assigned using using
this format.  The string identifying the language, then the message number (the
leading zero just improves the format, strictly it is not required), then the
actual message itself.  The message can be of arbitrary length.  Long messages
may be continued on following lines using the "\&#94;" continuation character.

|!bullet|

|^ 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.

|2Multiple Language Specifications|

|^ Multiple language messages can be specified in two ways:

|bullet|
|item| within the one file
|item| in multiple files specified by a multivalued logical name
|!bullet|

|0Within The One File||

|^ Language availability is specified through the use of [Language] directives. 
These must be numbered from 1 to the count of those supplied.  The highest
numbered language must have the complete set of messages for this is the
fallback when obtaining any message (this would normally be "en").  The
[Language] may be specified as a comma-separated list of equivalent or similar
specifications, which during request processing will be matched against a
client specified list of accepted-languages one at a time in specified order. 
A wildcard may be specified which matches all fitting the template.  In this
manner a single language can be used also to match minor variants or language
specification synonyms.

|code|
[Version]  9.0
[Language]  1  es,es-ES
[Language]  2  de,de-*
[Language]  3  en

[auth]
es 01  Habla Espanol
de 01  Sprechen Sie Deutsches
en 01  Do you speak English
.
.
.(full set of messages)
|!code|
|
In the above (rather contrived) example a client request with
|
|code|
Accept-Language: es-ES,de;q=0.6,en;q=0.3
|!code|
|
would have language 1 selected, a client with
|
|code|
Accept-Language: de-ch,es;q=0.6,en;q=0.3
|!code|
|
language 2 selected, with
|
|code|
Accept-Language: pt-br,de;q=0.6,en;q=0.3
|!code|
|
also language 2 selected, with
|
|code|
Accept-Language: pt
|!code|
|
language 3 (the default) selected, etc.

|^ Note that the messages for each language must use the *first* language
specification provided in the [Language] list.  In the example above all
messages for language 1 would be introduced using 'es', for language 2 with
'de' and for language 3 with 'en'.

|0Multiple Files - Multivalued Logical Name||

|^ With this approach a logical name containing multiple file names is defined
(more commonly described as a logical search list).  The final file specified
must contain the full message set.  Files specified prior to this, can contain
as many or as few of the full set as is desired.  A [Language] number does not
need to be specified as they are processed in the order the logical name
specifies them in.  Other language file directives are required.

|^ The following is an example of a logical name providing the same three
languages in the examples above.

|code|
$ DEFINE /SYSTEM WASD_CONFIG_MSG WASD_ROOT:[LOCAL]WASD_CONFIG_MSG_ES.CONF, -
                           WASD_ROOT:[LOCAL]WASD_CONFIG_MSG_DE.CONF, -
                           WASD_ROOT:[LOCAL]WASD_CONFIG_MSG.CONF
|!code|

|^ The file contents would be as follows (very contrived examples :-)

|code|
# WASD_CONFIG_MSG_ES.CONF
[Version]  9.0
[Language]  0  es,es-ES
[auth]
es 01  Habla Espanol
es 02  Habla Inglesi
[dir]
es 03  Habla Espanol
es 04  Habla Inglesi

# WASD_CONFIG_MSG_DE.CONF
[Version]  9.0
[Language]  0  de,de-*
[auth]
de 01  Sprechen Sie Deutsches
de 02  Sprechen Sie Englisch
[dir]
de 03  Sprechen Sie Deutsches
de 04  Sprechen Sie Englisch

# WASD_CONFIG_MSG.CONF
[Version]  9.0
[Language]  0  en
[auth]
.
.
.(full set of messages)
|!code|

|^ The |*major advantage| of maintaining multiple files in this way is there
is |*no need to merge files| when a new revision is required.  Just update the
version number and add any new required messages to the existing secondary
file.

|2Supplied 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 |link%|/wasd_root/example/WASD_CONFIG_msg*.conf|WASD_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.

||