TSTHWIN LANGUAGE TRANSLATION RULES
===================================

For who wants to try to construct a particoular language for tsthwin, here
are the messages list, or, at last, most of it.

But, before start to translate the language, you need  to  understand  how
the language work. First of all, a language can be  valid  only  for  some
tsthwin release... if a future tsthwin program will use more messages then
the actual, any language compiled for the  previsuly  version  won't  work 
anymore... they'll have to be updated to the new version.

--------------------------------------------------------------------------
Step 1, language name
--------------------------------------------------------------------------
The language file is basically a 32 bit DLL, renamed THW_XX.LNG.
XX is the country code, it is provided by windows, so you can't use a code
of your choice, you must use the right code.... here is the  list  of  the
country codes supported by windows:

Danish		DA		Dutch		NL
English		EN		Finnish		FI
French		FR 		German		DE
Icelandic	IS		Italian		IT
Norwegian 	NO 		Portuguese	PT
Swedish		SV		Spanish		ES 
Turkish		TR		Polish		PL
Czech		CS		Slovak		SK
Hungarian	HU		Russian		RU
Greek		EL


--------------------------------------------------------------------------
Step 2, dll header and file version
--------------------------------------------------------------------------
The MESSAGE.RC is the dll source code: if you look at it, you will be able
to see the dll definitions in the first block... it looks like this:

#define VERSIONINFO_1	1
VERSIONINFO_1 VERSIONINFO
FILEVERSION 210, 0, 0, 0
PRODUCTVERSION 84, 72, 87, 76
{
 BLOCK "StringFileInfo"
 {
  BLOCK "040904E4"
  {
   VALUE "CompanyName", "Your_name\000\000"
   VALUE "FileDescription", "Your file description\000"
   VALUE "FileVersion", "2.10\000\000"
   VALUE "InternalName", "TSTHWIN_LANGUAGE_DLL\000"
   VALUE "LegalCopyright", "Your copyright\000\000"
   VALUE "OriginalFilename", "THW_IT.LNG\000"
  }
 }
 BLOCK "VarFileInfo"
 {
  VALUE "Translation", 0x409, 1252
 }
}


There are only 3 fields you have to update:

- CompanyName: add you name, or you call
- FileDescription: for example, "Greek Tsthwin language v2.00"
- LegalCopyright: for example, "by IK1XXX"
- OriginalFilename: place the end users filename based on the country code
  above explained.

NOTE: don't remove the trailing zeros, e DON'T change nothing else in  the
section. The above is an example, the file you are reading can be a little 
different. 

The dll will be valid until a new tsthwin release will need more messages,
in that case, i will update the dll source code on my web page. Don't  try
to recompile the oldest dll for a new tsthwin, or it could crash.



--------------------------------------------------------------------------
Step 3, language traduction
--------------------------------------------------------------------------
The rest of the file is the tsthwin messages list. The list starts with the
keywords:

STRINGTABLE DISCARDABLE
BEGIN

then is following the message lists, while

END

stops the list. You MUSTN'T change that definitions. Any line that  starts
with the double // is a comment, and ignored.... but i think you know  all
of that, since you are try to compiling a DLL, surely you know the C basic
rules hi... the above is only for the beginners, the ones who  never  have
try to do a windows DLL.

Now, read carefully the following section, it explain what can be  changed
and what can't...

- If you look at the messages file, you can see  that  any  message  start
  with a line number... DON'T CHANGE IT.

- After the number, there is the message... any message is inside the  two 
  "", and ends with a ','.... for example:

  10 "This is the message",

  The ',' at the end of line means END OF LINE, this message is finished.

- Some messages line have more than a line... this is not a limitation  in
  line size, but is only to improve the visive impact  when  i  wrote  the
  code. Multiple line, must always be enclosed in "", but, only  the  last
  line of the code ends with the , characters... and the line  number  for
  the message is declared only in the first line.... for example:

  10 "This is the message",
  11 "and this is the second message"
     "that use multiple line"
     "as you can see....",
  12 "This is the thirdh message"

NOTE: depending of the compiler you are  using,  may  be  you'll  have  to
change this  sintax:  For  example,  Borland  compiler  work  fine,  while
Microsoft compiler don't want the  ','  at  the  end  of  the  line...  in
that  case  multiple  line  messages  can  be  constructed   putting   the
messages  in  a  single  line,  or   ending  a  line  with  the  typical \
characters. Look at your compiler manual about this.

- Well, now you can see some strange characters inside the messages... the
  can be %s %i.... the start with % characters,  you  MUSTN'T  change  it,
  because that sign are used to set internal variable in tsthwin. You  can 
  change its position inside the string, but you can't  remove  or  change
  the variable. For example:

  10 "Hallo %s, welcome to pms"    (in this case %s is the name)

  can safely be changed to:

  10 "Welcome to pms dear %s"

- Ok, another thing about strange characters.... \n, \r are often used  to
  indicate a linefeed, a carriage return caracters.... they  are  variable
  set to tell tsthwin to insert a linefeed in the message;  you  can  set,
  remove or change them as you like. For example: 

  10 "Hallo %s, welcome to the bbs\n"
     "there are message for you...\n\n"
     "please read them and kill.\n",

Again, C programmers surely know all about % and \ variable, don't hate me
about this superflous informations, they are again for the beginners.

Ok, the above are the general rules for messages translation, but i  would
tell you to keep the messages size the least is possible... Tsthwin have a
fixed number of bytes  to  store  messages,  and  messages  too  long  can
occasionally crash the system... Don't be too worry,  the  buffer  is  big
enough i think, but...


--------------------------------------------------------------------------
Step 4, compiling the language dll
--------------------------------------------------------------------------
The file MESSAGE.C is the DLL main entry point definitions. A DLL is  like
a program, it have an entry point too. Check if  the  proposed  sintax  is
right for your compiler, then compile you project,  that  is  composed  by
MESSAGE.C and MESSAGE.RC  file,  ensure  your  compiler doesn't  show  you
any errors or warnings, and if all is right, you have  now  your  language
DLL.

Rename it according to Step 1, place the  dll  in  tsthwin.exe  directory,
start tsthwin, and if you have done a right work, tsthwin will use it.

That's all, happy work
73, mario

