TTMSFNCLocalizationCollector Class
Collects the localizable strings and components of an application so they can be reviewed, edited, and translated.
API unit family: TMS.TMSFNCLocalizationCollector
Inherits from: TComponent
Implements: ITMSFNCProductInfo
Syntax
TMS.TMSFNCLocalizationCollector.hpp Pascal C++ TTMSFNCLocalizationCollector = class(TComponent, ITMSFNCProductInfo)
class PASCALIMPLEMENTATION TTMSFNCLocalizationCollector : public System::Classes::TComponent
Properties
Name
Description
AutoSaveOnDestroy
When True, the collected translation data is saved automatically when the component is destroyed.
KeepStaleEntries
When True, entries that a scan no longer finds in the application are kept when the translation data is saved.
LanguageDefinitions
The languages translations can be collected for, including the default language.
LocalizationFiles
Live storage layout loaded from and saved to the shared localization JSON file.
LocalizationFolder
Folder the translation data is loaded from and saved to.
RootElement
Root of the collected translation element tree.
Rules
Property rules that determine which elements and properties are ignored by analysis based on their class and property name.
Target
Language that collected values are currently translated into, or nil when the default language is active.
Version
Version number of the component, formatted as a display string.
Methods
Name
Description
AnalyzeApplication
Scans the forms and data modules currently registered with the running application and collects their localizable strings and components.
AnalyzeComponent
Scans the given component and its child components and collects their localizable strings under the given category.
AnalyzeFormModule
Scans a single form module and its child components and collects their localizable strings under the Forms category.
AnalyzeFrameModule
Collects a frame's own module as the authoritative Frames root, replacing a base that was guessed from an instance.
Clear
Clears all collected translation data.
ClearDeclaredModules
Forgets the declared modules, clearing every coverage flag.
Exclude
Excludes the given object from being scanned by subsequent analysis calls.
LoadFromFile
Loads translation data from the given file, replacing the currently collected data.
LoadFromStream
Loads translation data from the given stream, replacing the currently collected data.
LoadSettings
Loads the collected translation data from the configured translation folder, unless it was already loaded.
PrepareForDesignEdit
Resets the collected data and reloads it from the given folder, in preparation for an interactive design-time editing session.
ReApplyRules
Re-evaluates every collected element and property against the current set of property rules, restoring rule-driven items that no longer match and ignoring items that now do.
SaveSettings
Persists the collected translation data to the configured translation folder.
SaveToFile
Saves the collected translation data to the given file.
SaveToStream
Saves the collected translation data to the given stream.
SetDeclaredModules
Hands the collector the design modules the project declares, so the editor can report which of them have never been collected and which collected roots the project no longer declares. Design time only.
UnExclude
Removes a previous exclusion so the given object is scanned again by subsequent analysis calls.
Events
Name
Description
OnChange
Occurs whenever the collected translation data changes, for example after analysis, a load, or a rule re-application.
Used by