Switching translation tables in the scene of a dashboard

You use the Translation Table global parameter to allow users to change the translation of text values in a dashboard from a scene.

About this task

There might be a time when a dashboard user from a certain locale wants to select a different language in which to view text than the default language. You can use the Translation Table global variable to create controls that allow a user to switch from one translation table to another. The following steps describe one common way in which to create a user interface that gives a user this ability:

Procedure

  1. Create translation tables for each language that you want to include as an option in your dashboard.
  2. From the Palette view, select the list box object from the Controls palette and click and drag the shape in the editor window.
    The List Box Wizard opens.
  3. Select No and click Next.
    The Enter option and value list page opens.
  4. Click Finish.
    The List Box Wizard closes and the list box displays in the editor window.
  5. In the Properties view, select the OptionList property and click the Edit with Expression Designer button in the toolbar.
    The Expression Designer opens.
  6. Expand the Translation folder in the functions tree and double-click the getAvailableTranslationTables() function.
  7. Click OK.
    The Expression Designer closes and all of the translation table languages that you created are listed in the list box.
  8. From the Palette view, select the button object from the Controls palette and click and drag the shape in the editor window.
  9. With the button selected in the editor, open the Events view and double-click the Click event.
    The [Button Name] Behavior window opens.
  10. Click the Add New Action button.
    The Add New Action window opens.
  11. Double-click the Set values action.
    The Set values action parameters page opens.
  12. Click the Add New Entry button and then click the ellipsis (...) in the Parameter cell.
    The Expression Designer opens.
  13. From the Parameters folder of the Globals node, double-click Translation Table.
  14. From the List Box1 properties folder of the ListBox1 node, double-click the Selection property and click OK.
    The Expression Designer closes and control returns to the Add New Action window.
  15. Click Finish. The Set values action is added. The Add New Action window closes.
  16. From the [objectname] Behavior window, click the Apply button to apply all actions that have been added for the event.
  17. Click OK to close the [objectname] Behavior window.
  18. Click the Runtime tab, select a language from the list box, and click the button.
    The next time a process is run in the dashboard (such as running a query) the text values of the scene should display in the selected language.