Skip to main content

TdxLayoutContainer.BeginTranslation Method

Enables the translation mode for the container’s layout element captions.

Declaration

procedure BeginTranslation;

Remarks

The translation mode is useful for batch updates to captions when applying translations to multiple layout elements. In this mode, a string assigned to a layout element’s CaptionOptions.Text property is considered a translation and automatically replaces the element’s DefaultCaption property value.

Do the following to translate element captions:

  • Call the BeginTranslation procedure to enable the translation mode;

  • Assign new captions to layout elements using their CaptionOptions.Text property;

  • Call the EndTranslation procedure to disable this mode and apply the changes.

As with the BeginUpdate/EndUpdate method blocks, ensure that every BeginTranslation call has a corresponding EndTranslation call, even if an exception occurs.

Alternatively, the layout control provides the BeginTranslation and EndTranslation procedures, which internally call the corresponding container procedures.

See Also