Sign in Join
FPDoc Onlineexperiment

TPOFile.Create constructor

Member of TPOFilepublicIn unit Translations

Constructor for the class instance.

Declaration

pascal
constructor Create(Full: Boolean=True)
constructor Create(const AFilename: string; Full: Boolean=False)
constructor Create(AStream: TStream; Full: Boolean=False)

Description

Create is the overloaded constructor for the class instance. The overloaded variants allow the class to be created and populated from a TStream, a .po file, or uninitialized for use with an internal resource.

Create allocates resources needed in the class instance, and sets the default values for its members.

For the variant with the AFilename argument, a TFileStream instance is created for use in the overloaded Create method. The CreateHeader method is called if a value has not been assigned to the Header property.

The stream-based variant is used to load values from the TStream argument. The ReadPOText method is called to load, process, and apply the translation entries found in the .po file.

See also

An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.