Ich habe es so gelöst:
Delphi-Quellcode:
procedure TFRM_Main.SetLocal(LocalOverride:
string);
var
Reg: TRegistry;
AppName : PChar;
begin
Reg := TRegistry.Create;
try
if Reg.OpenKey('
Software\Borland\Locales', True)
then
Reg.WriteString(Application.ExeName, LocalOverride);
finally
Reg.Free;
end;
AppName := PChar(Application.ExeName) ;
ShellExecute(
Handle,'
open', AppName,
nil,
nil, SW_SHOWNORMAL) ;
Application.Terminate;
Close;
end;
procedure TFRM_Main.ACT_LANG_ENGExecute(Sender: TObject);
begin
SetLocal('
eng');
end;
procedure TFRM_Main.ACT_LANG_ITAExecute(Sender: TObject);
begin
SetLocal('
ita');
end;
procedure TFRM_Main.ACT_LANG_DEUExecute(Sender: TObject);
begin
SetLocal('
deu');
end;
procedure TFRM_Main.ACT_LANG_FRAExecute(Sender: TObject);
begin
SetLocal('
fra');
end;
Es wird dann entsprechend die Ressourcedatei AppName.xxx (xxx=deu/eng/ita...) beim Programmstart geladen.