Set the project's language during runtime
- Last UpdatedOct 29, 2026
- 2 minute read
You can set your project's language during run time by using the SetLanguage function anywhere that an expression can be configured.
Before you begin this task, you must have already added at least one target language to the Translation Table worksheet. For more information, see Add a target language to the Translation Table.
The SetLanguage function takes one parameter: the ID number of the the target language. Each language's ID number is shown in parentheses next to that language in the Translation Table worksheet — for example, "English-United States (1033)".
The following example shows how to draw two Button objects that switch the project's language between English and French:
-
In the Graphics tab of the Project Explorer, double-click a project screen to open it for editing.
-
On the Draw tab of the ribbon, in the Active Objects group, click Button.
-
Draw a Button object in the project screen.
-
Double-click the Button object.
The Object Properties dialog is displayed.
-
In the Caption box, type English.
-
Click Command.
The Command animation properties are displayed in the dialog.
-
In the first row of the On Down tab, in the Expression field, type SetLanguage(1033).

-
Close the Object Properties dialog.
-
Duplicate the Button object, either by copy-and-paste or by Ctrl-click.
-
Repeat steps 4 through 8, replacing the caption with French and the expression with SetLanguage(1036).

-
Save and close the project screen.
During project run time, clicking each button will set the language of the entire project to that language, using the translated text from the Translation Table.
Note: Setting your project's language will also automatically set the language of any Virtual Keyboards displayed in project screens, as long as there is a VK initialization file for the selected language. For more information, see Data input in screens on Thin Clients.