About English (en) lexicon usage

An important use of lexicons is for non-English language support. However, you can also modify the English (en) lexicon to provide a “global default” change for display of items seen in workbench, or served by a running station to client web browsers. This could be a possible alternative to working from the slot sheet for multiple points to make the same type of interface or “display name” change, or from making similar changes using the Batch Editor view of the ProgramService.

The English language serves as the default Workbench lexicon. As such, it is not included as a separate lexicon “en” distribution subfolder with module.lexicon files. However, using the Lexicon Editor view in Workbench you can still edit and add lexicon keys in different modules for English usage. These act as “default overrides”, saved as module.lexicon files in a!lexicon/en subfolder. After restarting Workbench, such changes are used when opening any station (including one on your Workbench PC, if applicable). Typically, you also install this modified en lexicon into remote JACE platforms, such that stations running on them serve up the same changed descriptions to browser clients.

Editing the default English (en) lexicon

This example describes how to add the English (en) lexicon to the list of currently installed lexicons in the Lexicon Report view.

To edit the English (en) lexicon:

  1. From the Tools menu, select Lexicon Tool.

    The Lexicon Report view (Figure 4) displays all lexicons currently installed.

  2. If an “en” lexicon is not listed in the left pane, click the New Lexicon button at the bottom. In the New Lexicon dialog box, type “en” in the Name field and click OK.

    An en entry is added to the bottom of the list of lexicons.

  3. Select the “en” lexicon, which populates the right pane with the different modules in which you can change or add lexicon keys.

Adding key-value pairs to a lexicon module

This procedure shows how to edit an existing lexicon to add key-value pairs. In this example, you edit the control module in the English (en) lexicon to add two key-value pairs in order to change the default right-click descriptors for the actions, “active” and “inactive”.

  1. In the Lexicon Report view, select the “en” lexicon in the left pane, which populates the right pane with the different modules in which you can change or add lexicon keys.

    NoteIf the English (en) lexicon is not listed, you can add it by following the procedure for Editing the default English (en) lexicon.

    In this case, you need to work in the control module.

  2. Double-click the control module, to load a list of existing key-value pairs in the Lexicon Editor.

    By default, there are no existing keys shown for the actions, active and inactive, so they must be added.

  3. Select the “Add New Key” check box at the bottom, far right in the view, which enables the Key field.

  4. In in the Key field, enter the slot name (in this case, type slot name active), and in the Value field enter the desired text, for example: ON manual

    Click the Update Value button to add the new key-value pair.

  5. Repeat the previous step to add another key-value pair, editing text in the Key field to: inactive

    and editing the desired text in the Value field, for example: OFF manual, as shown here.



    Deselect the “Add New Key” check box after adding this second key-value pair.

  6. Click the Save button on the toolbar.

    This creates (or updates) the control.lexicon file located in your !lexicon/en folder.

  7. Restart Workbench, open a station and right-click a writable point to issue actions.

    The new default values (ON manual and OFF manual) replace the old defaults (Active and Inactive).

    NoteIf working on a Supervisor (hosting a station), note that following a station restart, such lexicon changes become effective defaults to web browser clients connecting to the station.Note also that any “display name” changes for slots on a component override any lexicon values, including any modified in this manner. For example, if a BooleanWritable has the Display Name of its “active” action slot edited to “Start Pump”, that command text will always appear when issuing this action, whether from client browser access or from Workbench access.

Editing an existing key-value pair in a lexicon module

This procedure shows how to change the alarm module Priority key value from “Priority” to “Importance”.

To edit the alarm module in the English (en) lexicon:

  1. In the Lexicon Report view, select the “en” lexicon in the left pane, which populates the right pane with the different modules in which you can change or add lexicon keys.

    NoteIf the English (en) lexicon is not listed, you can add it by following the procedure for Editing the default English (en) lexicon.

    In this case, you need to work in the alarm module.

  2. Double-click the alarm module, to load a list of existing key-value pairs in the Lexicon Editor.

    Scroll or Search to find the priority key.

  3. In the Value field type in the desired text, for example: Importance

    Click the Update Value button to replace the previous value (Priority) for this key.

  4. Click the Save button on the toolbar.

    This creates (or updates) the alarm.lexicon file under your !lexicon/en folder.

  5. Restart Workbench, open a station and right-click a writable point to issue actions.

    The new default value (Importance) replaces the old default (Priority).

    NoteIf working on a Supervisor (hosting a station), note that following a station restart, such lexicon changes become effective defaults to web browser clients connecting to the station.Note also that any “display name” changes for slots on a component override any lexicon values, including any modified in this manner. For example, if a BooleanWritable has the Display Name of its “active” action slot edited to “Start Pump”, that command text will always appear when issuing this action, whether from client browser access or from Workbench access.

Creating of a new lexicon module for distribution

This procedure shows how to bundle two edited lexicon files (alarm, control) in a module for easy distribution.

NoteThis method can be used to bundle legacy lexicon files (from AX-3.6 and earlier) for distribution on an AX-3.7 or AX-3.8 installation.

To create the new lexicon module:

  1. From the Tools menu, select Lexicon Tool.

    The Lexicon Report view (Figure 4) displays all lexicons currently installed.

  2. Click the View dropdown menu and select Lexicon Module Builder. The Lexicon Module Builder view displays populating the selection table with any subfolders and files currently located under your !lexicon folder.

  3. Define the new module information by filling in the text fields as shown in this example:

    • Module Name: abcLex

    • Preferred Symbol: abc

    • Module Description: Modified En alarm and control

    • Vendor Name: Tridium

    • Version: 1.1

  4. Click the check box to select the following Source files in the En lexicon:

    • alarm.lexicon

    • control.lexicon

  5. Click the check box to Delete lexicon files after build to remove these source files from the !lexicon/en folder.

  6. Click the Build Module button.

    This creates the new module under your !modules folder, in this case the new module is abcLex.jar.

  7. Restart Workbench.

    In this example, navigate to the !modules folder and scroll to confirm the new module was created. You can install this new lexicon module on remote JACE platforms (using platform Software Manager), such that stations running on them serve up the same changed descriptions to browser clients.

    NoteIf working on a Supervisor (hosting a station), note that following a station restart, such lexicon changes become effective defaults to web browser clients connecting to the station.Note also that any “display name” changes for slots on a component override any lexicon values, including any modified in this manner. For example, if a BooleanWritable has the Display Name of its “active” action slot edited to “Start Pump”, that command text will always appear when issuing this action, whether from client browser access or from Workbench access.