Step 6.1.1. Configure Buttons to Change Languages or English Strings

  1. Open a CimEdit screen that has been configured for translation.

  1. Place a button on the screen.

  1. Open the button's Properties - Object dialog box.

  2. Label the button to notify a user what language or English string the CimView text will change to.

Note: Check Translate if you want the button label to be emitted to the translation file.

  1. Create a MouseUp event.

  1. Select the Events tab.

  2. Select a MouseUp event.

  3. Click the Popup button to the right of the Action field to open an Edit Script window.

  4. Create a new script as the action for the mouse up event as follows.

Sub OnMouseUp(x As Long, y As Long, flags As Long)

CimGetScreen.Application.Language ="String Description"

End Sub

Where

The "String Description" is the selected language, entered exactly as it is identified in the CIMPLICITY Language Mapper window.

If the entry is not exactly the same, the default language will display instead of the selected language.

  1. Compile the script and close the Edit Script window.

  1. Close the text button's Properties dialog box.

  2. Continue to create buttons until you have created as many as the screen should have.

Tip: If you are configuring a screen with buttons to change languages, add a button that enables the operator to re-select the default language after another language is selected.

Example

If English is the default language, add an English button. You do not need to create a column in the translation file. If there is no entry, the default language displays.

  1. (Optional) Emit the text labels on the text buttons and translate them in the translation file selected for the screen.

More information

Step 6.1. Configure translation options for CimView users.