SetLocaleEx

function SetLocaleEx(ctx: Required<TcHmi.Context>, locale: string): void

The function SetLocaleEx sets the active language in the client. The function SetLocaleEx provides a context parameter of type TcHmi.Context, which allows the framework to wait for the asynchronous signaling of the end of the action when executing within triggers or function expressions.

Refer also to the description page for the corresponding API function.

Parameter

Name

Type

Description

ctx

Required<TcHmi.Context>

Context object

Does not need to be specified by the user when used in a trigger or function expression. In this case the transfer and the evaluation is done by the corresponding parser.

Is used by the caller to indicate success or failure to the framework during execution.

If the function is used directly in JavaScript/TypeScript, the context object must be passed in the call and evaluated if necessary.

locale

string

A language registered in the project.

Return value

Type

Description

void

No return value.

NuGet package: Beckhoff.TwinCAT.HMI.Functions

SetLocaleEx 1:

NuGet packages are available from version 1.12.

SetLocaleEx 2:

Available from version 1.12