[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Translations' (#lazutils)

TPOFile.Header

Contains values for the header section in a .po file.

Declaration

Source position: translations.pas line 177

public property TPOFile.Header : TPOFileItem
  read FHeader;

Description

Header is a read-only TPOFileItem property which contains values read from the header section in the .po file. The header section is the first entry in a PO file that has empty string for its message Identifier (msgid). It contains meta-information about the content in the file, and also how a plural (a line with Plural-Forms) needs to be handled for that language.

The Translation property in Header is used to store the metadata found in the header section for the .po file. For example:

"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: ztrans-tool\n"
"Last-Translator: Wiley Coyote\n"
"Language-Team: acmecorpllc.com\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: de\n"

Use of a header section is optional in the .po file. TPOFile includes the CreateHeader method to ensure that the Header property is allocated - even when the values are not present in the content for the .po file.


Version 4.0 Generated 2025-05-03 Home