Debian Codegraph @

plugins/wcx/zip/src/ZipLng.pas

raw
1 {
2 Double Commander
3 -------------------------------------------------------------------------
4 Zip archiver plugin, language support
5
6 Copyright (C) 2023 Alexander Koblov ([email protected])
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 }
22
23 unit ZipLng;
24
25 {$mode delphi}
26
27 interface
28
29 uses
30 Classes, SysUtils;
31
32 resourcestring
33 rsCompressionMethodStore = 'Store';
34 rsCompressionMethodOptimal = 'Optimal (2x slower)';
35
36 rsCompressionLevelFastest = 'Fastest';
37 rsCompressionLevelFast = 'Fast';
38 rsCompressionLevelNormal = 'Normal';
39 rsCompressionLevelMaximum = 'Maximum';
40 rsCompressionLevelUltra = 'Ultra';
41
42 procedure TranslateResourceStrings;
43
44 implementation
45
46 uses
47 ZipFunc;
48
49 function Translate(Name, Value: AnsiString; Hash: LongInt; Arg: Pointer): AnsiString;
50 var
51 ALen: Integer;
52 begin
53 with gStartupInfo do
54 begin
55 SetLength(Result, MaxSmallint);
56 ALen:= TranslateString(Translation, PAnsiChar(Name), PAnsiChar(Value), PAnsiChar(Result), MaxSmallint);
57 SetLength(Result, ALen);
58 end;
59 end;
60
61 procedure TranslateResourceStrings;
62 begin
63 if Assigned(gStartupInfo.Translation) then
64 begin
65 SetResourceStrings(@Translate, nil);
66 end;
67 end;
68
69 end.
70