Adding Run-Time Language Switching Functionality
- Last UpdatedMar 24, 2023
- 2 minute read
Run-time 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 Run-time Language Switching.
To 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, click 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.

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

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