Add runtime language switching functionality
- Last UpdatedApr 23, 2025
- 2 minute read
Runtime users can switch the language of an application interface by using the WindowViewer Language command on the Special menu.
You can also add a button to your application to allow run-time users to switch the language. Before you start, make sure that you have configured the additional language for the application and that you know the locale ID for the language. For more information on configuring languages for an application, see Configuring languages for runtime language switching.
Add a button for switching languages at run time
-
In WindowMaker, open the application window that you want to add the language switching button.
-
Draw a button, and assign a text label to the button that indicates the language to be switched to when selected.
-
Double-click the button.
The animation selection dialog box appears.

-
In the Touch Pushbuttons area, select Action.
The Touch -> Action Script dialog box appears.

-
Double-click anywhere in the script area of the Touch -> Action Script dialog box.
The Select Tag dialog box appears.

-
Select the $Language system tag and then select OK.
Set the $Language system tag equal to the locale ID of the language you are assigning to the button and select OK.

Note: You can also use the script function SwitchDisplayLanguage(LocaleID) instead of the $Language tag.
-
Select OK to close the dialog box.