changeLang()

Function for switching the language at runtime in a user interface.

Synopsis

void changeLang(string newLang);

Parameters

Parameter Description
newLang Name of the language which shall be displayed.

Return Value

In the event of an error -1, otherwise 0.

Errors

Missing or incorrect parameters.

Description

The language in a user interface can be changed at runtime (the language is changed for all modules and panels that were opened with the user interface manager) via this function. Only languages which were defined when creating the project are available for this function (e.g. a multilingual project with "de_AT.utf8" and "en_US.utf8").

When using changeLang() or switchLang(), the Initialize script of the panel is executed again. For more detailed information on this behavior see the chapter Online language switching.

Example

Change the language of the user interface to German.

main()
{
  changeLang("de_AT.utf8");
}

Assignment

Multilingual functionality

Availability

UI