Page tree
Skip to end of metadata
Go to start of metadata

Text and Localization in the EUI

Text that appears throughout the EUI is controlled by the macro $ewText.get() and a set of variables in the record.

The macro $ewText.get(“key”) finds the appropriate file based on the user’s session locale. In the file, each “key” is associated with a text string, and the $ewText.get macro substitutes this value in the page.

For instance, the home page contains the following link:

<a href='#ew_forward("new_helpdeskcase.html")'>$ewText.get('')</a>

The link’s text is defined by the variable in the appropriate translation file, for instance, “Create a Helpdesk Case” for English or “Создать запрос” for Russian.

In, the text keys begin with home.doc.h3.

#These variables provide the text on the home pages
home.doc.h3=Documents a Document My Documents All Documents
home.hc.h3=Helpdesk Cases a Helpdesk Case Helpdesk Cases
home.rep.h3=Repair Requests a Repair Request My Repair Requests Cases My Support Cases a Support Case
home.con.h3=Contracts My Contracts All Contracts a Contract Request Requests

Changing Text in the Interface

To alter the text in a template page...

  1. Open the applicable template to find the name of the variable that defines the text you want to change.
  2. Open the template and find the variable, then edit the text that follows the equals sign (=).

Text variables are organized by function (home page, menu, title bar) and then by table to help you determine which variables apply to which text based on the variable name.

Why not enter text directly in page templates?

You might feel that substituting variables is a rather indirect way to manage text on the page, and indeed it would be simpler to edit text directly on the various pages. There is nothing to prevent you from bypassing the $ewText.get macro and simply entering text directly into the EUI Template pages if you want to.

There are two main reasons the interface uses variables for text:

  • Support for multiple language usage.  By using variables, the admin can create a full translation of the end user interface by simply copying the template to a new one with a different language attached, e.g.  The text values in that file can then be translated so that someone logging in to the program with the French locale will see the translated French text values.
  • Consistency and ease of changes. It is easier to make a consistent terminology change when the text variables are separated into a single file. Each home page variant references the same set of text variables. By using the same variables in each home page, if you decide to change the name of a table, for instance, from Support Cases to Support Tickets, you can go to the translation templates and make all the terminology changes across the board in one place.

Localization with ewText.get

The purpose of the $ewText.get() method is to allow for a multilingual environment. The method #ewtText.get($key) works together with another EUI template, is actually a family of templates; the default  Agiloft setup includes several localization files such as and which hold Russian and Chinese text respectively. For more information, see Localization.

The file is used when no locale is set for the user's session. This is initially in English, but you could choose to use a different default locale/language.

Each row of consists of a key/value pair, in the form key1=value1


home.1table.title=Welcome to the Agiloft custom portal.

In this case, home.1table.title is the key, and the value is the text "Welcome to the Agiloft custom portal".

The $ewText.get($key) method checks each user's session locale and uses that to determine which file to use. Setting the session locale can be done in a number of ways.

  • One possibility is to set the locale in the login link using lang=XX.
  • Another is to use the #ew_languages macro to display a list of available languages for the user. 

For more information on  Agiloft's localization-related macros, see EUI Macro Reference


Let's add a new key/value pair to Bear in mind that in a multilingual environment, the key and its translated value must be added to each translation template file.

  1. Open from the EUI Templates table and add the following line of text under #These variables provide the text on the home pages:
    newtask.title=Create a Task | Agiloft End User Portal
    newtask.header=Create a Task
  2. Click Save.
  3. Now open new_task.html and make the following changes in the Body field:
    1. Within the <title> tags, replace register.title with newtask.title.
    2. Within the <h2> tags, replace Register with Create a Task.
  4. Save the record, log back into the EUI, and note the changes.
  • No labels