[Overview][Classes][Procedures and functions][Index] Reference for unit 'LCLTranslator' (#lcl)

TDefaultTranslator.TranslateStringProperty

Gets the translated value for the specified property.

Declaration

Source position: lcltranslator.pas line 64

public procedure TDefaultTranslator.TranslateStringProperty(

  Sender: TObject;

  const Instance: TPersistent;

  PropInfo: PPropInfo;

  var Content: string

); override;

Arguments

Sender

  

Class instance calling the method.

Instance

  

Persistent object with properties affected in the method.

PropInfo

  

RTTI Property information.

Content

  

Value for the translated string property.

Description

TranslateStringProperty is a procedure used to get the translated value for the specified property from the .mo file used in the class instance.

Sender is the class instance requesting the translation action.

Instance is the TPersistent object instance affected in the method.

PropInfo contains the RTTI property information needed to update the property value.

TranslateStringProperty uses the internal TMOFile instance created in the constructor to get the translated value for the property name. The translated string value is stored in the Content argument and returned to the caller. The property value is actually updated in the caller.

No actions are performed in the method if a .mo file was not found with the required file name.


Version 4.0 Generated 2025-05-03 Home