Plastic.Localize
async function Localize(ctx: Context, key: TcHmi.Symbol): voidThe 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:
- All passed LocalizationKeys (in the following key) that exist in the package are displayed in the selected language.
- If an identical key is created in the project, the translation provided by the package will be overwritten.
- This allows keys to be quickly adapted in a single language.
- User-specific languages can be maintained directly in the project.
- In contrast to the import of all keys from the Tc3_PlasticLocalization control, new localizations can be used after a package update without new import.
- Any key that cannot be found in the selected language in either the project or the package is marked with a
<N/A>. - Makes it easier to identify untranslated keys in engineering. This marking is therefore only visible in engineering.
- These markings are disabled on a published server.
Example call:

Example results:
- Key exists:

- Key does not exist:

![]() | 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:
|
Parameters
Name | Type | Description |
|---|---|---|
ctx <hidden> | Context object with feedback on the error/success of the execution. | |
key | The LocalizationKey, to be translated by the function. |
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
