I posted a similar question before, but this was with an earlier edition of tsilang.
Under Delphi 2006, I have a few projects that use several common units. There are some units that are straight PAS units and some units that are DFM/PAS form units.
What would be the best way to provide translatable projects?
Secondly, what would be the best course of action to provide tranlastion for the project? I'm thinking it would be better to have a project based SIL file for each language externally, but does this work when a project has several common units/forms? Or would I be better to keep the translations internally on the main form for each project and then do an export to use the tools to create the translation, then bring them back to the application.
Lance
Common Units or Forms
Re: Common Units or Forms
To translate units which have associated DFMs you can use as usual TsiLang Expert. In order to be able to re-use them in another project you will just need to add some line of code that will initialize TsiLang properties like LangDispatcher and CommonContainer to point to project's dispatcher and common container (if used).LanceRasmussen wrote:Under Delphi 2006, I have a few projects that use several common units. There are some units that are straight PAS units and some units that are DFM/PAS form units.
What would be the best way to provide translatable projects?
To translate common units without form you can create one common data-module and use it as translation holder for these units. Later you just add this datamodule to project and initializa dispatcher property as described above.
First at all, I would recommend to use SIB file instead of SIL, because it is much faster. The method to use depends on your situation and many users select any one. We, in particular, use the second way. All translations stored in DFM and before the release we export them, translate and import back if needed as well as provide SIB for "end-user translation" feature.Secondly, what would be the best course of action to provide tranlastion for the project? I'm thinking it would be better to have a project based SIL file for each language externally, but does this work when a project has several common units/forms? Or would I be better to keep the translations internally on the main form for each project and then do an export to use the tools to create the translation, then bring them back to the application.
Best regards,
Igor Siticov.
Igor Siticov.
-
- Posts: 6
- Joined: Thu May 20, 2004 12:02 am
Common Forms
Thanks for the advice.
So to make sure I understand.... would this be a good idea.
Project specific forms -> DataModuleProject
Put the TSILang, Dispatcher components here.
Put the language link component on each project specific form and link to the project data module
Project specific PAS only files -> Data Module Project
Refer each pas file to the datamodule
Common forms -> DatamoduleCommon
Do I put a dispatcher and Lang here too or just a Link which would point to the project datamodule?
Common PAS -> Datamodule Common
Point to the common data module.
I agree that it sounds beeter to use the SIB. Its a matter of using this as an external SIB file or have a SIB file for all or each language.
So to make sure I understand.... would this be a good idea.
Project specific forms -> DataModuleProject
Put the TSILang, Dispatcher components here.
Put the language link component on each project specific form and link to the project data module
Project specific PAS only files -> Data Module Project
Refer each pas file to the datamodule
Common forms -> DatamoduleCommon
Do I put a dispatcher and Lang here too or just a Link which would point to the project datamodule?
Common PAS -> Datamodule Common
Point to the common data module.
I agree that it sounds beeter to use the SIB. Its a matter of using this as an external SIB file or have a SIB file for all or each language.
Re: Common Forms
Yes.LanceRasmussen wrote: Project specific forms -> DataModuleProject
Put the TSILang, Dispatcher components here.
Put the language link component on each project specific form and link to the project data module
YesProject specific PAS only files -> Data Module Project
Refer each pas file to the datamodule
No, it is better to link to project dispatcher. Just one-two lines of code actually. But much easier to maintain.Common forms -> DatamoduleCommon
Do I put a dispatcher and Lang here too or just a Link which would point to the project datamodule?
YesCommon PAS -> Datamodule Common
Point to the common data module.
This only depends on your preferencesI agree that it sounds beeter to use the SIB. Its a matter of using this as an external SIB file or have a SIB file for all or each language.

Best regards,
Igor Siticov.
Igor Siticov.
-
- Posts: 6
- Joined: Thu May 20, 2004 12:02 am
Commons
Igor,
Thanks... for answering all the questions.
If I do link my common forms/Common DataModule for common PAS to the project dispatcher (using code to set the pointer to the project's dispatcher)........ Does each common form/PAS remember its translation? Or do I have to re-enter the translations for each project?
Thanks... for answering all the questions.
If I do link my common forms/Common DataModule for common PAS to the project dispatcher (using code to set the pointer to the project's dispatcher)........ Does each common form/PAS remember its translation? Or do I have to re-enter the translations for each project?