Page 1 of 1

Getting languages from SIB file???

Posted: Wed Feb 25, 2004 10:55 am
by sjordi
Hi,
The languages are correctly defined in my SIB file. But when dynamically loaded at run time to obtain the list of available languages, they are wrong.
It should be English, Français, Español but it displays
English, Language N2, Language N3

The code I use is as follows (I fill in a listbox called "list")
siLangDispatcher1->LoadAllFromFile( "full.sib" ) ;
list->Clear() ;
for( int i=0; i<siLangDispatcher1->NumOfLanguages; i++ ) {
list->Items->Add( siLangDispatcher1->LangNames->Strings ) ;
}

This code works perfectly with SIL files. Is this a bug from the binary form in SIB???
It affects only the list of the languages, the translations still work correctly when switching languages.
Thanks for any help (code shown is C++Builder 6)

Posted: Wed Feb 25, 2004 12:41 pm
by isiticov
Could you please try to replace special chars (umlauts) in language names and check if this would help?
Because may this is the origin of problem.

Posted: Wed Feb 25, 2004 2:48 pm
by sjordi
Just tried, didn't change anything.
I can send the .sib file
Steve whici is 4Kb (it'a test file)

Posted: Wed Feb 25, 2004 5:47 pm
by isiticov
Please send it to us among with test project where it was used. Thanks.

Posted: Thu Feb 26, 2004 8:14 am
by sjordi
Done,
I sent the file to your support email address
Steve

Posted: Thu Feb 26, 2004 6:55 pm
by isiticov
Thank you for your files. There was small bug in TsiLangDispatcher
LoadAllFromFile() method which is already fixed in our internal sources.
This is why we were unable to reproduce the bug.
You can either wait till next release or modify the siComp.pas by replacing
all occurrences of FileName to AFileName in

Code: Select all

procedure TsiLangDispatcher.LoadAllFromFile(FileName: Tstring);
Be sure to replace it in procedure's body, declaration and definition as
well.

Thank you again.