Sign in Join
FPDoc Onlineexperiment

TPOFile.SaveToFile procedure

Member of TPOFilepublicIn unit Translations

Stores values from Header and the sorted POItems to the specified file name.

Declaration

pascal
procedure SaveToFile(const AFilename: string)

Description

SaveToFile is a method used to store the contents in the .po file class instance to the file name specified in the AFilename argument. AFilename contains an optional path and the file name and extension where the values are stored.

SaveToFile creates a temporary TStringList instance and calls the SaveToStrings method to populate the list with the Header and Items in the class instance. Its contents are stored to the location specified in AFilename. If AFilename already exists, it is overwritten.

Value are written to the file in the PO (Portable Object) format used by the GNU gettext localization library. See SaveToStrings for more information about the properties included in the output and their storage formats.

Use the overloaded Create variant with a file name argument to load a .po file class instance from a specified file using the .po format.

See also

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