SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Common Units or Forms

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
LanceRasmussen



Joined: 20 May 2004
Posts: 6

PostPosted: Thu Oct 19, 2006 11:22 pm    Post subject: Common Units or Forms Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Oct 20, 2006 2:25 am    Post subject: Re: Common Units or Forms Reply with quote

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 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).
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.

Quote:
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.

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.
Back to top
View user's profile Send private message
LanceRasmussen



Joined: 20 May 2004
Posts: 6

PostPosted: Fri Oct 20, 2006 4:32 am    Post subject: Common Forms Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Oct 20, 2006 6:20 am    Post subject: Re: Common Forms Reply with quote

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

Yes.
Quote:

Project specific PAS only files -> Data Module Project
Refer each pas file to the datamodule

Yes
Quote:
Common forms -> DatamoduleCommon
Do I put a dispatcher and Lang here too or just a Link which would point to the project datamodule?

No, it is better to link to project dispatcher. Just one-two lines of code actually. But much easier to maintain.
Quote:

Common PAS -> Datamodule Common
Point to the common data module.

Yes

Quote:
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.

This only depends on your preferences Smile You can use either one which you like more, but having one SIB for all languages is easier to maintain (IMHO!).
Back to top
View user's profile Send private message
LanceRasmussen



Joined: 20 May 2004
Posts: 6

PostPosted: Fri Oct 20, 2006 4:58 pm    Post subject: Commons Reply with quote

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?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Sat Oct 21, 2006 12:54 pm    Post subject: Reply with quote

Translations are stored into each TsiLang on form and linking them to any dispatcher won't erase them. So you can link common forms (modules) to any dispatcher and translations will be re-used.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group