TMS FNC Localization String Catalog
TTMSFNCLocalizationStringCatalog stores application strings that are not attached to a control — runtime messages, dialog prompts, status text, formatted labels built in code — together with their translations. Each entry has a name and a value; at runtime you look an entry up by name with GetByName and get its value in the currently active language. It is a non-visual component that works alongside the Localizer, which keeps the stored values in sync with the active language.
Documentation
| Start here | Use when |
|---|---|
| Getting started | You want to store and look up a translated string quickly. |
| User guide | You want the details: adding entries, looking them up, and reacting to language changes. |
| API reference | You want class, property, method, and event details. |
| Release notes | You want the String Catalog change history. |
Quick start
Add a named string and retrieve its value in the active language:
procedure TForm1.FormCreate(Sender: TObject);
var
Entry: TTMSFNCLocalizationString;
begin
{ Entries are usually added at design time; shown here in code. }
Entry := StringCatalog.Strings.Add;
Entry.Name := 'Greeting';
Entry.Value := 'Hello';
end;
procedure TForm1.SayHello;
begin
{ Returns the value for 'Greeting' in the currently active language
(empty string when no entry has that name). }
ShowMessage(StringCatalog.GetByName('Greeting'));
end;
Key classes
| Class | Role |
|---|---|
TTMSFNCLocalizationStringCatalog |
The catalog component; look up entries with GetByName. |
TTMSFNCLocalizationStrings |
The collection of entries (Strings). |
TTMSFNCLocalizationString |
One named entry (Name / Value). |