Page 1 of 1

How to Translate Frames

Posted: Wed Feb 12, 2020 4:18 pm
by plumothy
My Delphi project will be using frames. I have viewed other questions in this forum to learn how to translate frames that are created and placed at design time. This is what I do - can you confirm it is OK?
1 Create the frame and drop a TsiLangLinked on it
2 Place the frame on the form that needs it
3 Set the LangDispatcher property of the TsiLangLinked in the placed frame
4 Double-click on TsiLangLinked in the placed frame to edit the translations.

But for frames which are placed at runtime I do not know what to do. Can you give me a simple guide for this?

Posted: Thu Feb 13, 2020 5:17 am
by isiticov
Hello,

You can set LangDispatcher property on your first step. And then as second step you can just edit translations for frame before placing it on other form. So when you place it at run-time it will already have translations.

Posted: Thu Feb 13, 2020 12:24 pm
by plumothy
I cannot do that because my Frame does not use the MainForm (because it is common to multiple projects).

So, here is what I have done:
- a DataModule with a TsiLangDispatcher and a TsiLang
- several different Frames (each with a TsiLangLinked) that use the DataModule
- MainForm (with a TsiLangLinked) which uses the DataModule and deploys the frames (some at design time, some at runtime).

That works nicely.