How to Add a New Translation to Transact

Applies to: All versions of Ephesoft Transact

If a language you’re looking for is not supported by Ephesoft, you can add your own translations to the Transact UI by editing the locale files.

What are locale files?

A locale file is a JavaScript (.js) file that contains a set of translations for the text strings used in Transact. In the Ephesoft file structure, there are separate locale files for each UI screen. The locale files contain an entry for each language.

Where are the locale files?

The locale files are located at [Ephesoft_Directory]\Application\i18n and [Ephesoft_Directory]\Application\custom\i18n. The i18n folder contains the following folders, each of which contains their respective locale.js file:

  • batchClassManagement
  • batchInstance
  • batchlist
  • common
  • customWorkflow
  • folderManager
  • licenseGenerator
  • login
  • report
  • rv
  • systemConfig
  • theme
  • uploadbatch
  • webscanner

How do I add a new translation?

To add a new translation, perform the following steps for each respective locale.js file:

  1. Before making any changes, make a copy of the locale.js file as a backup.
  2. Copy the var statement from the English (default) messages.

Note: English var statements don’t have any language suffixes. For example, in the screenshots below, figure 1 shows the English variable with no language suffix while figure 2 shows the French translation variable in the same file with the _fr suffix:

Figure 1. English Variable (default)

Figure 2. French Variable

  1. Paste the copied variable at the end of the locale.js file.
  2. Add a suffix for the language you’re adding a translation for. We recommend using ISO language codes for consistency.
  3. Replace each message in the variable with their respective translations.
  4. Repeat steps 1–5 for all *.js files in the [Ephesoft_Directory]\Application\i18n and [Ephesoft_Directory]\Application\custom\i18n folders.
  5. Modify [Ephesoft_Directory]\Application\WEB-INF\classes\META-INF\application.properties. Modify the locale_language entry and add additional language codes separated by a semicolon.
  6. Restart the Transact service.
  7. Change the default language setting on your browser to test the language codes you added.

Note: As this is a JavaScript file, do not make any changes to the formatting or alignment of the script. Any syntax errors will prevent Transact from accessing the translations.