hedgewars/uLocale.pas
changeset 7048 0a4c88935902
parent 6700 e04da46ee43c
child 7049 35d762458d66
equal deleted inserted replaced
7047:606acf1f80be 7048:0a4c88935902
    26 
    26 
    27 procedure LoadLocale(FileName: shortstring);
    27 procedure LoadLocale(FileName: shortstring);
    28 function  Format(fmt: shortstring; var arg: shortstring): shortstring;
    28 function  Format(fmt: shortstring; var arg: shortstring): shortstring;
    29 function  Format(fmt: ansistring; var arg: ansistring): ansistring;
    29 function  Format(fmt: ansistring; var arg: ansistring): ansistring;
    30 function  GetEventString(e: TEventId): ansistring;
    30 function  GetEventString(e: TEventId): ansistring;
       
    31 
       
    32 {$IFDEF HWLIBRARY}
       
    33 procedure LoadLocaleWrapper(str: pchar); cdecl; export;
       
    34 {$ENDIF}
    31 
    35 
    32 implementation
    36 implementation
    33 uses uRandom, uUtils, uVariables, uDebug, uConsole;
    37 uses uRandom, uUtils, uVariables, uDebug, uConsole;
    34 
    38 
    35 var trevt: array[TEventId] of array [0..Pred(MAX_EVENT_STRINGS)] of ansistring;
    39 var trevt: array[TEventId] of array [0..Pred(MAX_EVENT_STRINGS)] of ansistring;
   127     Format:= fmt
   131     Format:= fmt
   128 else
   132 else
   129     Format:= copy(fmt, 1, i - 1) + arg + Format(copy(fmt, i + 2, Length(fmt) - i - 1), arg)
   133     Format:= copy(fmt, 1, i - 1) + arg + Format(copy(fmt, i + 2, Length(fmt) - i - 1), arg)
   130 end;
   134 end;
   131 
   135 
       
   136 {$IFDEF HWLIBRARY}
   132 procedure LoadLocaleWrapper(str: pchar); cdecl; export;
   137 procedure LoadLocaleWrapper(str: pchar); cdecl; export;
   133 begin
   138 begin
   134     LoadLocale(Strpas(str));
   139     LoadLocale(Strpas(str));
   135 end;
   140 end;
       
   141 {$ENDIF}
   136 
   142 
   137 end.
   143 end.