-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLanguageU.pas
60 lines (50 loc) · 1.15 KB
/
LanguageU.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
unit LanguageU;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
RadioGroup1: TRadioGroup;
procedure RadioGroup1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
uses
Registry;
procedure SetLocalOverrides(FileName: string; LocaleOverride: string);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
if Reg.OpenKey('Software\Borland\Locales', True) then
Reg.WriteString(FileName, LocaleOverride);
finally
Reg.Free;
end;
end;
procedure TForm1.RadioGroup1Click(Sender: TObject);
var
s, x : String;
begin
s := ExtractFilePath(Application.ExeName);
if RadioGroup1.ItemIndex = 1 then
x := 'enu'
else
x := '';
SetLocalOverrides(s + 'Playlist.exe', x);
SetLocalOverrides(s + 'Database.exe', x);
SetLocalOverrides(s + 'Utility.exe', x);
SetLocalOverrides(s + 'Studio19.exe', x);
SetLocalOverrides(s + 'Traffic.exe', x);
SetLocalOverrides(s + 'Log.exe', x);
SetLocalOverrides(s + 'Settings.exe', x);
end;
end.