Getting started with the Collector
This page covers the shortest path to gathering your application's translatable text: prerequisites, adding the component, and a first scan. For the full workflow — scoping collection, excluding objects, saving, and reacting to changes — see the user guide.
Prerequisites
- TMS FNC Core installed and the runtime package added to the project.
- TMS FNC Localization installed.
Add the component
Drop a TTMSFNCLocalizationCollector from the TMS FNC Localization palette tab — usually onto the same data module as the Localizer, so the whole application shares one translation set. Point it at a translation folder and call AnalyzeApplication to gather everything translatable:
procedure TDataModule1.DataModuleCreate(Sender: TObject);
begin
{ Collector is usually dropped on a data module together with the localizer. }
Collector.LocalizationFolder := TPath.Combine(TPath.GetDocumentsPath, 'Translations');
{ Save the collected set automatically when the component is destroyed. }
Collector.AutoSaveOnDestroy := True;
{ Walk the running application and gather everything translatable. }
Collector.AnalyzeApplication;
end;
Most projects drive the collector through the Localization Editor at design time — the editor uses the collector to scan the application and lets you translate what it finds — but the same collection API is available in code, as shown above.
See also
- User guide — scoping, excluding, saving, and change events
- Collecting translatable text
- API reference