hedgewars/uLocale.pas
changeset 11151 5c40c65b619d
parent 11046 47a8c19ecb60
parent 11141 01e8e5a6a8c1
child 11200 08c6ccc28007
--- a/hedgewars/uLocale.pas	Thu Sep 10 04:59:02 2015 +0200
+++ b/hedgewars/uLocale.pas	Thu Sep 10 18:22:52 2015 +0200
@@ -30,7 +30,7 @@
 function  GetEventString(e: TEventId): ansistring;
 
 {$IFDEF HWLIBRARY}
-procedure LoadLocaleWrapper(str: pchar); cdecl; export;
+procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
 {$ENDIF}
 
 implementation
@@ -133,9 +133,17 @@
 end;
 
 {$IFDEF HWLIBRARY}
-procedure LoadLocaleWrapper(str: pchar); cdecl; export;
+procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
 begin
-    LoadLocale(Strpas(str));
+    PathPrefix := Strpas(path);
+ 
+    uUtils.initModule(false);
+    uPhysFSLayer.initModule;
+ 
+    LoadLocale(Strpas(filename));
+ 
+    uPhysFSLayer.freeModule;
+    uUtils.freeModule;
 end;
 {$ENDIF}