Translation support

Web Management Console

Overview

Email Gateway Security supports translating its Web Management Console.

Currently the product is shipped with translations for British English (en-GB), US English (en-US) and Japanese (ja-JP).

To translate the product to a new language does not require upgrading the product at all. It does not even require restartgin the product services.

After configuring and translating the new locale only the browser needs to be reloaded.

Configuration

Email Gateway Security uses JSON format files to store the translation configurations and the actual translations for each supported language.

The configuration and translation files can be found in :

Copy

Default:

Copy

The configuration is done in the locales.json file.

EntryDescription
availableLocalesContains the list of available locales (translations) as key and value pairs. The keys are the codes of each locale (e.g. en-US). A key consists of a language code (e.g. en for English) and a territory code (e.g. US for United States). The values are the labels of each locale in the Web Management Console.
rtlAn array containing the codes of languages that read right-to-left. These languages will be displayed accordingly in the Web Management Console. Every language that is not on this list will be treated as left-to-right.

Translation

New locales

Translation for a new locale may be created by duplicating and appropriately renaming an existing (e.g. en-US.json) translation file.

The new locale must be added to the locales.json file.

As an example the translation for the Hungarian language in Hungary (hu-HU) may be created by:

  1. Clone the en-US.json translation file

  2. Rename the cloned file to hu-HU.json

  3. Add an entry to the locales.json for the Hungarian language

    1. To the availableLocales entry: "hu-HU": "Magyar"
    2. (Hungarian is left-to-righ, no need to add it to the rtl entry)
  4. Do the actual translation in the hu-HU.json file.

  5. Open the Web Management Console and observe the new locale appearing.

Changing existing translations

Translations for existing locales may be changed simply editing the appropriate translation file.

Editing translation files

The json format files are plain text files. Texts in these files may be edited using any plain text editor.

The json syntax of the configuration and translation files must be maintained.

In case of syntax errors the Web Management Console may not render.

As an alternative translation file editor applications may be used, like:

Product upgrades

During a product upgrade, changes to translations that are shipped with the product and changes to the locales.json may be lost. Back up these file before the upgrade, and restore after.

Translation files added on top of the ones that are shipped with the product are kept by an upgrade.

Flags

Email Gateway Security has pre-installed the flags for most of the territories.

Flags that are missing from the collection may be added to <installation directory>\nginx\html\assets\img\flags (default C:\Program Files\OPSWAT\MetaDefender Email Security\nginx\html\assets\img\flags) in SVG format.

Not to translate or change

Changing variables, references and pipes give unexpected results. Care must be taken to keep these tokens unchanged.

TokenDetailsExample
VariableSyntax: "{variableName}" A name in curly brackets inside the text represent a variable. Variables, as usual, hold values that gets inserted into the text at runtime.

"anti-spam-result": {``"title": "Phishing/Spam verdict",``"probability": "Probability: {probability}/9"``}

In this example {probability} is a variable.

Reference

Syntax: "@:reference.to.other.value"

The fully qualified name of an other value after an at (@) character and a colon (:) character inside the text represent a reference. References refer to the values of other entries.

"buttons": {``"cancel": "@:common.buttons.cancel",``"confirm": "Download"``}

In this example @:common.buttons.cancel refers to a common Cancel button label, that is the same throughout the whole product.

PipeSyntax: | This is a separator character that separates the singular and plural form of texts.

"use-password": {``"label": "Encrypt downloaded email | Encrypt downloaded emails",``"description": "This option encrypts the archive file the emails are converted as"``}

In this example the singular and plural versions of the label are separated by the pipe.

Notification, alert and report emails

Overview

Templates of the notification, alert and report emails can be found in:

Copy

Default:

Copy

These files are plain text xslt (Extensible Stylesheet Language Transformations) files, that can be edited using plain text editors or xslt editors.

The alert email for the event MetaDefender Core not responding looks like this:

The source code of this alert's template is in the file alert_core_not_responding.xsl:

Translation

The xslt template that belongs to the appropriate alert, notification or report email needs to be edited and the appropriate strings translated.

This is how translating a part of the _MetaDefender Core not responding _notification to Hungarian looks like in the alert_core_not_responding.xsl file:

And this is the actual alert email when this change is applied:

After applying the translations to the xslt files, there is no need to reinstall or restart the product.

Not to translate or change

Given by the nature of XML transformations, any part of the xslt files can be changed for example to restructure the alert emails.

If no restructuring in the scope, then only the text literals (that are readable in the email) should be changed.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard