Best Approach

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
LanceRasmussen
Posts: 6
Joined: Thu May 20, 2004 12:02 am

Best Approach

Post by LanceRasmussen »

We have a project with a vast number of units that are common among other projects.

What is the best plan of implementation to use SIComponents to manage the localization of the projects?

Bear in mind that a common unit may be modified in one project and then simply compiled in the next build(s) of other projects.

We prefer to minimize the amount of redunancy and want to also facilitate external translators.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

May be as an idea could be used the following:
1. If your units don't have associated forms then add datamodules to them and place TsiLang there and use as conrainer for translations.
2. In uses clause of units add reference to the dispatcher using compiler conditional defines, fro ex.

Code: Select all

uses
  {$IFDEF PROJECT1}Project1DispatcherUnit,
  {$ELSE}
  {$IFDEF PROJECT2}Project2DispatcherUnit,
  {$ENDIF}
  {$ENDIF}
3. In each project options define respective conditional define.
4. In OnCreate() event of datamodule(s) from 1. add assigning of LangDispatcher property depending on conditional define.

This will only require to make a FULL build each time when you switch between projects.

Please note this is just a raw idea :)
Post Reply