hedgewars/uLocale.pas
branchqmlfrontend
changeset 11833 a69124eb7ce7
parent 11704 83c40c1eb0e7
parent 11807 975c130c3901
child 12860 1b2b84315d27
equal deleted inserted replaced
11832:8c71c5a1172f 11833:a69124eb7ce7
    28 function  Format(fmt: shortstring; var arg: shortstring): shortstring;
    28 function  Format(fmt: shortstring; var arg: shortstring): shortstring;
    29 function  FormatA(fmt: ansistring; var arg: ansistring): ansistring;
    29 function  FormatA(fmt: ansistring; var arg: ansistring): ansistring;
    30 function  GetEventString(e: TEventId): ansistring;
    30 function  GetEventString(e: TEventId): ansistring;
    31 
    31 
    32 {$IFDEF HWLIBRARY}
    32 {$IFDEF HWLIBRARY}
    33 procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
    33 procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export;
    34 {$ENDIF}
    34 {$ENDIF}
    35 
    35 
    36 implementation
    36 implementation
    37 uses uRandom, uUtils, uVariables, uDebug, uPhysFSLayer;
    37 uses uRandom, uUtils, uVariables, uDebug, uPhysFSLayer;
    38 
    38 
   131     FormatA:= fmt
   131     FormatA:= fmt
   132 else
   132 else
   133     FormatA:= copy(fmt, 1, i - 1) + arg + FormatA(copy(fmt, i + 2, Length(fmt) - i - 1), arg)
   133     FormatA:= copy(fmt, 1, i - 1) + arg + FormatA(copy(fmt, i + 2, Length(fmt) - i - 1), arg)
   134 end;
   134 end;
   135 
   135 
   136 {$IFDEF HWLIBRARY}
   136 procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export;
   137 procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
       
   138 begin
   137 begin
   139 // FIXME
       
   140 {    PathPrefix := Strpas(path);
       
   141  
       
   142     uUtils.initModule(false);
       
   143     uVariables.initModule;
       
   144     uPhysFSLayer.initModule;
       
   145 } 
       
   146     LoadLocale(Strpas(filename));
   138     LoadLocale(Strpas(filename));
   147 { 
       
   148     uPhysFSLayer.freeModule;
       
   149     uVariables.freeModule;
       
   150     uUtils.freeModule;}
       
   151 end;
   139 end;
   152 {$ENDIF}
       
   153 
   140 
   154 end.
   141 end.