How to delete a language by code ?
i tried "SibFileMAnager.siComponents[0].DeleteLanguage(2)", in debugmode i can see, that ".LangNAmes.Count" decreases, but when i save file with "SibFileMAnager.savetofile..." the changes i made are NOT saved...
Delete language by code
Re: Delete language by code
Hello,
If you need to delete the language from the SIB file ONLY, then here is a sample working code:
Hope this helps.
If you need to delete the language from the SIB file ONLY, then here is a sample working code:
Code: Select all
procedure TForm9.Button1Click(Sender: TObject);
var
SIB: TSIBFileManager;
I: Integer;
begin
// load file
SIB := TSIBFileManager.CreateByName('ee.sib');
try
for I := 0 to SIB.CompCount - 1 do
// delete 2nd language for all components
SIB.siComponents[I].DeleteLanguage(2);
// save file back to disc
SIB.SaveToFile('ee_without2nd.sib');
finally
SIB.Free;
end;
end;
Best regards,
Igor Siticov.
Igor Siticov.
Re: Delete language by code
Hello Igor,
that works perfect !
Thank you !
Best regards
Andreas
that works perfect !
Thank you !
Best regards
Andreas