home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / refex / ex94.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  826 b   |  33 lines

  1. Program Example94;
  2.  
  3. { Program to demonstrate the SetResourceStringValue function. }
  4. {$Mode Delphi}
  5.  
  6. ResourceString
  7.  
  8.   First  = 'First string';
  9.   Second = 'Second String';
  10.  
  11. Var I,J : Longint;
  12.     S : AnsiString;
  13.     
  14. begin
  15.   { Print current values of all resourcestrings }
  16.   For I:=0 to ResourceStringTableCount-1 do
  17.     For J:=0 to ResourceStringCount(i)-1 do
  18.       begin
  19.       Writeln ('Translate => ',GetResourceStringDefaultValue(I,J));
  20.       Write   ('->');
  21.       Readln(S); 
  22.       SetResourceStringValue(I,J,S); 
  23.       end;
  24.   Writeln ('Translated strings : ');    
  25.   For I:=0 to ResourceStringTableCount-1 do
  26.     For J:=0 to ResourceStringCount(i)-1 do
  27.       begin
  28.       Writeln (GetResourceStringDefaultValue(I,J));
  29.       Writeln ('Translates to : ');
  30.       Writeln (GetResourceStringCurrentValue(I,J));
  31.       end;
  32. end.
  33.