home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / RADOOR30.ZIP / ML-MOD.ZIP / STRC_LNG.100 < prev   
Encoding:
Text File  |  1994-04-10  |  3.4 KB  |  103 lines

  1.  
  2.               -=( Structures of my language file version 1.00 )=-
  3.                           (c) LiveSystems 1991, 1992
  4.  
  5.  
  6. Introduction
  7. ════════════
  8.  
  9. This document describes the way RAdoor's multilanguage extentions does what
  10. it does. It also describes the structure of the language datafile.
  11.  
  12.  
  13.  
  14. The general structure of the language file is:
  15. ══════════════════════════════════════════════
  16.  
  17.  ┌──────────────────────────────┐
  18.  │        Special record        │
  19.  ├──────────────────────────────┤
  20.  │      Index entries 1 ..      │
  21.  /      Special.entries         /
  22.  │                              │
  23.  ├──────────────────────────────┤
  24.  │                              │
  25.  /      The language data       /
  26.  │                              │
  27.  └──────────────────────────────┘
  28.  
  29.  
  30. Record definitions:
  31.  
  32.      SpecialRecord  = Record
  33.                        FileId    : Array[1..32] Of Char;
  34.                        VersionNr : Word;
  35.                        ProgName  : String[8];
  36.                        LanguageID: String[3];           { ENG/NL     }
  37.                        YesDef    : Char;                { Y          }
  38.                        NoDef     : Char;                { N          }
  39.                        StopDef   : Char;                { S          }
  40.                        YesNorm   : Char;                { y          }
  41.                        NoNorm    : Char;                { n          }
  42.                        StopNorm  : Char;                { s          }
  43.                        BrackRgt  : Char;                { [          }
  44.                        BrackLft  : Char;                { ]          }
  45.                        ENTER     : String[10];          { ENTER      }
  46.                        Colors    : Array[0..9] Of Byte; { Colortable }
  47.                        Entries   : Word;
  48.                       End;
  49.  
  50.      IndexEntryRec  = Record
  51.                        Nr    : Word;
  52.                        Start : Word;
  53.                        Len   : Byte;
  54.                       End;
  55.  
  56. Meanings:
  57. ═════════
  58.  
  59. Special record
  60. ──────────────
  61. FileId      : Contains "LiveSystems language file v1.00^Z"
  62. VersionNr   : Contains the languagefile version nr. = $0100
  63. ProgName    : The name of the datafile's owning program
  64. LanguageID  : the 3 CHAR language ID. f.e. ENG (english) HOL (Hollands)
  65.  
  66. YesDef      : Yes default char (uppercase)
  67. NoDef       : No default char
  68. StopDef     : Stop default char
  69.  
  70. YesNorm     : Yes Normal char (Lowercase)
  71. NoNorm      : No Normal char
  72. StopNorm    : Stop normal char
  73.  
  74. BrackRgt    : The Right bracket to use
  75. BrackLft    : The left bracket to use
  76. ENTER       : the ENTER text (max. 10 chars long)
  77. Colors      : The defined colors (Max 10)
  78.  
  79. Entries     : The number of entries in the file.
  80.  
  81.  
  82. Index:
  83. ──────
  84. Nr          : String number
  85. Start       : Start of string in language data part
  86. Len         : Length of string in language data part
  87.  
  88.  
  89.  
  90. How RADoor handles all this:
  91. ════════════════════════════
  92.  
  93. When a door written with the multilanguage options of RAdoor has detected
  94. the language ID to use, it first reads the SpecialRecord of the language
  95. definition file. Then it reads the index into an array (Dynamical allocated)
  96. and the language data into a chunk of memory (unformated, just a bunch of
  97. chars)
  98.  
  99. When a ]xxx code is seen, the language unit searches for the sentencenr.
  100. When found, it uses a move to get the desired string. If not found the
  101. *PROGRAMMER ERROR* string is returned..
  102.  
  103.