Page 1 of 1

Best Approach

Posted: Fri Jan 07, 2005 9:30 pm
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.

Posted: Sat Jan 08, 2005 7:10 am
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 :)