equal
deleted
inserted
replaced
51 {$IFDEF HWLIBRARY} |
51 {$IFDEF HWLIBRARY} |
52 procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export; |
52 procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export; |
53 {$ENDIF} |
53 {$ENDIF} |
54 |
54 |
55 implementation |
55 implementation |
56 uses uRandom, uUtils, uVariables, uDebug, uPhysFSLayer; |
56 uses SysUtils, uRandom, uUtils, uVariables, uDebug, uPhysFSLayer; |
57 |
57 |
58 var trevt: array[TEventId] of array [0..Pred(MAX_EVENT_STRINGS)] of ansistring; |
58 var trevt: array[TEventId] of array [0..Pred(MAX_EVENT_STRINGS)] of ansistring; |
59 trevt_n: array[TEventId] of integer; |
59 trevt_n: array[TEventId] of integer; |
60 |
60 |
61 procedure LoadLocale(FileName: shortstring); |
61 procedure LoadLocale(FileName: shortstring); |
63 f: pfsFile; |
63 f: pfsFile; |
64 a, b, c: LongInt; |
64 a, b, c: LongInt; |
65 first: array[TEventId] of boolean; |
65 first: array[TEventId] of boolean; |
66 e: TEventId; |
66 e: TEventId; |
67 begin |
67 begin |
|
68 {- TODO: Add support for localized decimal separator in Pas2C -} |
|
69 {$IFNDEF PAS2C} |
|
70 lDecimalSeparator:= FormatSettings.DecimalSeparator; |
|
71 {$ENDIF} |
|
72 |
68 for e:= Low(TEventId) to High(TEventId) do |
73 for e:= Low(TEventId) to High(TEventId) do |
69 first[e]:= true; |
74 first[e]:= true; |
70 |
75 |
71 f:= pfsOpenRead(FileName); |
76 f:= pfsOpenRead(FileName); |
72 checkFails(f <> nil, 'Cannot load locale "' + FileName + '"', false); |
77 checkFails(f <> nil, 'Cannot load locale "' + FileName + '"', false); |