Pb Changing TLabel.caption when Loading SIB with Dispatcher

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
rhodan
Posts: 5
Joined: Tue Jan 14, 2003 6:02 pm

Pb Changing TLabel.caption when Loading SIB with Dispatcher

Post 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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post 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]
Post Reply