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

TPOFile.UpdateStrings

Adds or updates translation entries in POItems using the values specified in InputLines.

Declaration

Source position: translations.pas line 147

public procedure TPOFile.UpdateStrings(

  InputLines: TStrings;

  SType: TStringsType

);

Arguments

InputLines

  

TStrings instance with the translation entries stored in the .po file class instance.

SType

  

Identifies the format for the identifiers and values in the InputLines argument.

Description

UpdateStrings is a method used to refresh the translation entries in the .po file from the values specified in the InputLines argument. Values in InputLines are stored using the format specified in the SType argument, and includes:

stLrj
Lazarus resource string table in JSON format
stRst
FPC resource string table (before FPC 2.7.1)
stRsj
FPC resource string table in JSON format (since FPC 2.7.1)

UpdateStrings provides nested routines used to read the various formats and to apply the translation entries to POItems. Each identifier and value are read from InputLines and UpdateItem is called to store the data.

UpdateStrings is used in the implementation of the UpdatePOFile routine.

See also

TPOFile.POItems

  

Provides indexed access to the translation entries in the class instance.

TPOFile.Items

  

Provides access to the TFPList instance where translation entries are stored.

TPOFile.UpdateItem

  

Adds or updates a translation entry which has the specified Identifier.

TPOFileItem

  

Represents a single key/value pair in a .po file which maps a string to its translated value.

TStringsType

  

Format used in the string table passed to the TPOFile.UpdateStrings method.


Version 4.0 Generated 2025-05-03 Home