Ich habs jetzt mal so gemacht:
Delphi-Quellcode:
procedure prLoadModuleLanguage(frmModule : TForm);
var
i : Integer;
begin
For i := 0 To frmModule.ComponentCount -1 Do
Begin
//TAdvPage
If (frmModule.Components[i] is TAdvPage) Then
Begin
(frmModule.Components[i] as TAdvPage).Caption := fnGetComponentCountryText('Component', frmModule.Name, 'TAdvPage', (frmModule.Components[i] as TAdvPage).Name);
End;
//TAdvToolBar
If (frmModule.Components[i] is TAdvToolBar) Then
Begin
(frmModule.Components[i] as TAdvToolBar).Caption := fnGetComponentCountryText('Component', frmModule.Name, 'TAdvToolBar', (frmModule.Components[i] as TAdvToolBar).Name);
End;
//TAdvGlowButton
If (frmModule.Components[i] is TAdvGlowButton) Then
Begin
(frmModule.Components[i] as TAdvGlowButton).Caption := fnGetComponentCountryText('Component', frmModule.Name, 'TAdvGlowButton', (frmModule.Components[i] as TAdvGlowButton).Name);
End;
End;
end;
Ist der Lösungsansatz schlechter als der von deddyH oder Sir Rufo?