Plastic.Localize

async function Localize(ctx: Context, key: TcHmi.Symbol):  void

The Plastic.Localize function can be used for flexible use of the localizations provided in the Beckhoff.TwinCAT.HMI.Plastic.Localization package. The function implements the following behaviors:

Example call:

Plastic.Localize 1:

Example results:

Plastic.Localize 4:

Fast change of a key not possible from TwinCAT HMI 14.x.

The fast change of a key in the input field (by slowly double-clicking) is no longer possible from TwinCAT HMI 14.x. To change the symbol anyway, we recommend the following approach:

  • Select the key by clicking on it once
  • Start entering the new key, beginning with %l%
  • Once you have entered the key, append a final %/l%.
  • Confirm your entry with the Enter key.
  • The text entered is automatically converted into the newly assigned key.

Parameters

Name

Type

Description

ctx <hidden>

Context

Context object with feedback on the error/success of the execution.

key

TcHmi.Symbol

The LocalizationKey, to be translated by the function.
This value must be passed as a symbol.

Return value

Type

Description

void

No return value.

NuGet package: Beckhoff.TwinCAT.HMI.Plastic.Localization

Available: since version 12.22.0

Use: TC3 Plastic Application HMI Projects