Today I gibe TsiLang a try. I´m searching for a good solution to translate our application.

The most things work really fine with TsiLang. But we have special Dialogs from another component (wpTools). There are screen preview dialogs for example.
Is there a way to translate these dialogs with TsiLang, too?

The main problem is the following: I don´t want to change anything within the wpTools code / forms. This would result in frequently changes if there are updates from wpTools.

If these dialogs use resourcestrings to initialize the UI element then you can easily translate them using Resource Strings Wizard from TsiLang Expert menu Tools->Wizards. You will need just to open your project's EXE in Wizard and select strings related to these dialogs.
Please let me know if this helps. Otherwise there is another "hack" for such situation but I hope it won't be needed.

In such case we will need to use some "hacking". The procedure is as the following:
1. Create SIL/SIB file for these dialogs.
2. Translate this file .
3. Load it at run-time.

To create such SIL/SIB file you can use the following:
1. Create procedure MyScreenActiveFormChange
2.Assign the code like this:

Code:

// replace 3rdPartyFormClassName with the class name for the dialog form
if (Screen.ActiveForm <> nil) (and Screen.ActiveForm.ClassName = '3rdPartyFormClassName') then
begin
with TsiLangLinked.Create(Screen.ActiveForm) do
begin
BuildList;
SaveAllToBinaryFile(... insert here the name of your SIB file);
// in order to save into SIL file just use SaveAllToFile()
end;
end;

3. Assign the procedure from 1. to Screen.OnActiveFormChange event in your code.
4. Run your application and display such dialog to execute the code above

To load and translate dialogs you will need the similar code. Something like the following:

To load SIL/SIB file above you will need either:
1. Disctribute it with your application. Fits the best if you use external translation storing for the application as well.
2. You can place it into application's resource and save it to disk from resource into temporary folder. Also you may use LoadAllFromStream() method of TsiLang to load the content directly from TResourceStream. But in this case your will need to use SIL files since Stream functions are SIL oriented.

Hope this helps.

Last edited by isiticov on Thu Aug 03, 2006 5:52 pm; edited 1 time in total

Yes, of course. The demo version contains just one limitation: Delphi or C++Builder must be running when you execute applications translated with TsiLang.
After upgrating to registered version all your work will be re-used so you won't loose any translation after upgrating.

Works fine ... so far. In my SIB file I have three languages: German, English and French. But the Dialogs have not the default headline. My headlines are German, English and French for the translation of Forms. The dialogs have the headlines Language N1, ... N2, ... N3.

What should I do to get the normal headlines there.
Code like this don´t works ...