-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnit4.pas
40 lines (29 loc) · 856 Bytes
/
Unit4.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
unit Unit4;
interface
uses Windows, SysUtils, forms,registry ;
function LoadStringLanguage(number:integer):string;
function GetLanguage : string;
implementation
function GetLanguage : string;
Var
Registre : TRegistry;
begin
Registre:=TRegistry.Create;
Registre.RootKey:=HKEY_CURRENT_USER;
Registre.OpenKey('SOFTWARE\Ledadu\Cronos Rename',False);
GetLanguage:=Registre.ReadString('Language');
Registre.Free;
end;
function LoadStringLanguage(number:integer):string;
var
a : array[0..255] of char;
StrTblOfs : integer;
begin
StrTblOfs := 0;
if GetLanguage = 'EN' then StrTblOfs := 0;
if GetLanguage = 'FR' then StrTblOfs := 50;
//Input mask string (lang)
if LoadString(hInstance,StrTblOfs + number,a,sizeof(a)) <> 0 then
LoadStringLanguage:= StrPas(a);
end;
end.