Page 1 of 1

Pb Changing TLabel.caption when Loading SIB with Dispatcher

Posted: Mon Jan 26, 2004 4:31 pm
by rhodan
Hi,

TsiLang : v5.2.5
Delphi 7 Pro

I'm using a external SIB File.
It's loaded during MainForm Create by TsiLangDispatcher. All Translation in the main form are right but in others forms managed with a TsiLangLinked TLabel.Caption are not translated by SIB file and keeps their original content (each TsiLangLinked uses the TsiLangDispatcher).
Note : Language Switch works fine.

Is there specific manipulation to realize in TsiLangLinked component when loading a SIB from TsiLangDispatcher?

Rhodan

Posted: Mon Jan 26, 2004 6:20 pm
by isiticov
This looks like the forms which have problems with translating are created later than SIB file loaded. In order to load SIB file for all forms even for run-time created you should:
1. Either set FileName property of TsiLangDispatcher to your SIB file name.
2. Or use OnLinkToDispatcher event to load SIB file to currently linking component to TsiLangDispatcher:

Code: Select all

procedure TForm1.siLangDispatcher1LinkToDispatcher(Sender: TObject;
  ASiLang: TsiCustomLang);
begin
  ASiLang.LoadAllFromBinaryFile('YOURSIBFILE.SIB');
end;
Hope this helps.[/code]