home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / BABEL2.ZIP / BABELEVT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-01-01  |  8.3 KB  |  250 lines

  1. {$I compiler }
  2. UNIT BabelEvt;INTERFACE USES Objects,Views,Dialogs,
  3.                              Babel_X,Babel_I;
  4.    {|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  5.  
  6.    BABEL - Provide dialog in appropriate language
  7.  
  8.    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||}
  9. function PrintDialog : PDialog ;
  10. function CreateFindDialog : PDialog ;
  11. function CreateReplaceDialog : PDialog ;
  12. IMPLEMENTATION
  13.    {===================================================================
  14.  
  15.    SELECT PRINTER
  16.  
  17.    ===================================================================}
  18. function PrintDialog : PDialog ;
  19.    {-------------------------------------------------------------------
  20.    ENGLISH
  21.    -------------------------------------------------------------------}
  22. function PrintE : PDialog ;
  23. {$IFDEF code}{$I port.src }{$ENDIF}
  24. begin
  25. {$IFDEF code}
  26.    PrintE                    := MakeDialog ;
  27. {$ELSE}
  28.    PrintE                    := PDialog ( RezFile^.Get ( 'DIALOG_PORT' ) ) ;
  29. {$ENDIF}
  30. end ;
  31.    {-------------------------------------------------------------------
  32.    GERMAN
  33.    -------------------------------------------------------------------}
  34. function PrintG : PDialog ;
  35. {$IFDEF code}{$I portG.src }{$ENDIF}
  36. begin
  37. {$IFDEF code}
  38.    PrintG                    := MakeDialog ;
  39. {$ELSE}
  40.    PrintG                    := PDialog ( RezFile^.Get ( 'DIALOG_PORTG' ) ) ;
  41. {$ENDIF}
  42. end ;
  43.    {-------------------------------------------------------------------
  44.    SPANISH
  45.    -------------------------------------------------------------------}
  46. function PrintS : PDialog ;
  47. {$IFDEF code}{$I portS.src }{$ENDIF}
  48. begin
  49. {$IFDEF code}
  50.    PrintS                    := MakeDialog ;
  51. {$ELSE}
  52.    PrintS                    := PDialog ( RezFile^.Get ( 'DIALOG_PORTS' ) ) ;
  53. {$ENDIF}
  54. end ;
  55.    {-------------------------------------------------------------------
  56.    FRENCH
  57.    -------------------------------------------------------------------}
  58. function PrintF : PDialog ;
  59. {$IFDEF code}{$I portF.src }{$ENDIF}
  60. begin
  61. {$IFDEF code}
  62.    PrintF                    := MakeDialog ;
  63. {$ELSE}
  64.    PrintF                    := PDialog ( RezFile^.Get ( 'DIALOG_PORTF' ) ) ;
  65. {$ENDIF}
  66. end ;
  67.    {-------------------------------------------------------------------
  68.    DUTCH 
  69.    -------------------------------------------------------------------}
  70. function PrintD : PDialog ;
  71. {$IFDEF code}{$I portD.src }{$ENDIF}
  72. begin
  73. {$IFDEF code}
  74.    PrintD                    := MakeDialog ;
  75. {$ELSE}
  76.    PrintD                    := PDialog ( RezFile^.Get ( 'DIALOG_PORTD' ) ) ;
  77. {$ENDIF}
  78. end ;
  79.    {- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  80.    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}
  81. begin
  82.    case DefaultHint [ 1 ] of
  83.    'G' : PrintDialog    := PrintG ;
  84.    'S' : PrintDialog    := PrintS ;
  85.    'F' : PrintDialog    := PrintF ;
  86.    'D' : PrintDialog    := PrintD ;
  87.    else
  88.       PrintDialog            := PrintE ;
  89.    end ;
  90. end ;
  91.    {===================================================================
  92.  
  93.    SEARCH - created with DLGDSN
  94.  
  95.    ===================================================================}
  96. function CreateFindDialog : PDialog ;
  97.    {-------------------------------------------------------------------
  98.    ENGLISH
  99.    -------------------------------------------------------------------}
  100. function EFind : PDialog ;
  101. {$IFDEF code} {$I find.src } {$ENDIF}
  102. begin
  103. {$IFDEF code}
  104.    EFind                     := MakeDialog ;
  105. {$ELSE}
  106.    EFind                     := PDialog ( RezFile^.Get ( 'DIALOG_FIND' ) ) ;
  107. {$ENDIF}
  108. end ;
  109.    {-------------------------------------------------------------------
  110.    GERMAN
  111.    -------------------------------------------------------------------}
  112. function FindG : PDialog ;
  113. {$IFDEF code} {$I FindG.src } {$ENDIF}
  114. begin
  115. {$IFDEF code}
  116.    FindG                     := MakeDialog ;
  117. {$ELSE}
  118.    FindG                     := PDialog ( RezFile^.Get ( 'DIALOG_FINDG' ) ) ;
  119. {$ENDIF}
  120. end ;
  121.    {-------------------------------------------------------------------
  122.    SPANISH
  123.    -------------------------------------------------------------------}
  124. function FindS : PDialog ;
  125. {$IFDEF code} {$I FindS.src } {$ENDIF}
  126. begin
  127. {$IFDEF code}
  128.    FindS                     := MakeDialog ;
  129. {$ELSE}
  130.    FindS                     := PDialog ( RezFile^.Get ( 'DIALOG_FINDS' ) ) ;
  131. {$ENDIF}
  132. end ;
  133.    {-------------------------------------------------------------------
  134.    FRENCH
  135.    -------------------------------------------------------------------}
  136. function FindF : PDialog ;
  137. {$IFDEF code} {$I FindF.src } {$ENDIF}
  138. begin
  139. {$IFDEF code}
  140.    FindF                     := MakeDialog ;
  141. {$ELSE}
  142.    FindF                     := PDialog ( RezFile^.Get ( 'DIALOG_FINDF' ) ) ;
  143. {$ENDIF}
  144. end ;
  145.    {-------------------------------------------------------------------
  146.    DUTCH
  147.    -------------------------------------------------------------------}
  148. function FindD : PDialog ;
  149. {$IFDEF code} {$I FindD.src } {$ENDIF}
  150. begin
  151. {$IFDEF code}
  152.    FindD                     := MakeDialog ;
  153. {$ELSE}
  154.    FindD                     := PDialog ( RezFile^.Get ( 'DIALOG_FINDD' ) ) ;
  155. {$ENDIF}
  156. end ;
  157.    {- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  158.    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}
  159. begin
  160.    case DefaultHint [ 1 ] of
  161.    'G' : CreateFindDialog    := FindG ;
  162.    'S' : CreateFindDialog    := FindS ;
  163.    'F' : CreateFindDialog    := FindF ;
  164.    'D' : CreateFindDialog    := FindD ;
  165.    else
  166.       CreateFindDialog       := EFind ;
  167.    end ;
  168. end ;
  169.    {===================================================================
  170.  
  171.    REPLACE - created with DLGDSN
  172.  
  173.    ===================================================================}
  174. function CreateReplaceDialog : PDialog ;
  175.    {-------------------------------------------------------------------
  176.    ENGLISH
  177.    -------------------------------------------------------------------}
  178. function ReplaceE : PDialog ;
  179. {$IFDEF code} {$I replace.src } {$ENDIF}
  180. begin
  181. {$IFDEF code}
  182.    ReplaceE                  := MakeDialog ;
  183. {$ELSE}
  184.    ReplaceE                  := PDialog ( RezFile^.Get ( 'DIALOG_REPLACE' ) ) ;
  185. {$ENDIF}
  186. end ;
  187.    {-------------------------------------------------------------------
  188.    GERMAN
  189.    -------------------------------------------------------------------}
  190. function ReplaceG : PDialog ;
  191. {$IFDEF code} {$I replaceG.src } {$ENDIF}
  192. begin
  193. {$IFDEF code}
  194.    ReplaceG                  := MakeDialog ;
  195. {$ELSE}
  196.    ReplaceG                  := PDialog ( RezFile^.Get ( 'DIALOG_REPLACEG' ) ) ;
  197. {$ENDIF}
  198. end ;
  199.    {-------------------------------------------------------------------
  200.    SPANISH
  201.    -------------------------------------------------------------------}
  202. function ReplaceS : PDialog ;
  203. {$IFDEF code} {$I replaceS.src } {$ENDIF}
  204. begin
  205. {$IFDEF code}
  206.    ReplaceS                  := MakeDialog ;
  207. {$ELSE}
  208.    ReplaceS                  := PDialog ( RezFile^.Get ( 'DIALOG_REPLACES' ) ) ;
  209. {$ENDIF}
  210. end ;
  211.    {-------------------------------------------------------------------
  212.    FRENCH
  213.    -------------------------------------------------------------------}
  214. function ReplaceF : PDialog ;
  215. {$IFDEF code} {$I replaceF.src } {$ENDIF}
  216. begin
  217. {$IFDEF code}
  218.    ReplaceF                  := MakeDialog ;
  219. {$ELSE}
  220.    ReplaceF                  := PDialog ( RezFile^.Get ( 'DIALOG_REPLACEF' ) ) ;
  221. {$ENDIF}
  222. end ;
  223.    {-------------------------------------------------------------------
  224.    DUTCH 
  225.    -------------------------------------------------------------------}
  226. function ReplaceD : PDialog ;
  227. {$IFDEF code} {$I replaceD.src } {$ENDIF}
  228. begin
  229. {$IFDEF code}
  230.    ReplaceD                  := MakeDialog ;
  231. {$ELSE}
  232.    ReplaceD                  := PDialog ( RezFile^.Get ( 'DIALOG_REPLACED' ) ) ;
  233. {$ENDIF}
  234. end ;
  235.    {- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  236.    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -}
  237. begin
  238.    case DefaultHint [ 1 ] of
  239.    'G' : CreateReplaceDialog    := ReplaceG ;
  240.    'S' : CreateReplaceDialog    := ReplaceS ;
  241.    'F' : CreateReplaceDialog    := ReplaceF ;
  242.    'D' : CreateReplaceDialog    := ReplaceD ;
  243.    else
  244.       CreateReplaceDialog       := ReplaceE ;
  245.    end ;
  246. end ;
  247.    {^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  248.    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^}
  249. END.
  250.