Hello.
I am trying to load an SIB file into the Language Dispatcher at run time:
siLangDispatcher1.FileName := 'Maintenance.sib';
siLangDispatcher1.LoadAllFromFile('Maintenance.sib');
siLangDispatcher1.ActiveLanguage := 1;
The file, when viewed in the editor, has 2 languages defined (English and Chinese). However, after loading, Dispatcher still holds only one language.
Exporting the very same file in SIL format and using the SIL file instead (exactly the same code) works just fine.
Any ideas what the problem is?
Thanks!
Best wishes,
-Boris
Loading SIB file into Dispatcher does not work
When loading from SIB file the dispatcher languages are not updated, but when loading from SIL file they do automatically. So it works, and in order to update the dispatcher's languages you can just use something like following:
Code: Select all
siLangDispatcher1.LangNames.Assign(siLang1.LangNames);
Still does not seem to work...
Sorry, this does not seem to work. Even after I assign language names from siLang1, I still have only 1 language in the Dispatcher...
If I assign siLangDispatcher1.NumOfLanguages := 2;
then deverything seems to work, and language names are picked up properly from the SIB file. But of course I do not necessarily know the actual number of languagees at design time.
Is there some other trick to find the number of languages present in the SIB file and assign it to the Dispatcher?
Thanks!
-Boris
If I assign siLangDispatcher1.NumOfLanguages := 2;
then deverything seems to work, and language names are picked up properly from the SIB file. But of course I do not necessarily know the actual number of languagees at design time.
Is there some other trick to find the number of languages present in the SIB file and assign it to the Dispatcher?
Thanks!
-Boris
Sorry, it should be used the following:
then it would work.
Code: Select all
siLangDispatcher1.LangNames := siLang1.LangNames;
Thanks
Thank you! That seems to have worked.