Editing WebMail Templates

The advice offered on this page should only be used by users who are confident in the modification of HTML. If you are unsure about this process, we recommend that you first learn a basic knowledge of HTML before you continue to make any modifications. For more detailed information on what each option of the WebMail settings is for, please view the WebMail page.

What are WebMail Templates and How Do They Work? #

The pages displayed by the WebMail service are a combination of HTML, CSS, JavaScript and static content such as images and other files, together with dynamic data loaded from the WebMail Application Programming Interface (API). The WebMail service by default uses an integrated web server on port 8000 to run both the static and dynamic content. Port 80 is the default HTTP port but usually this will be already in use by a web server such as Internet Information Services (IIS). You can, however, configure IIS to host a website for the static content of your WebMail template by pointing this at the WebMail template folder. This will allow the static content to be loaded by IIS on port 80 and the dynamic content to be loaded via API calls to the WebMail API server on port 8000 allowing you to access in your web browser via a normal domain (e.g. http://www.yourdomain.com) without having to append :8000 for the non-standard port.

Before Making Changes #

It is important that before making any changes, you create a copy of the 'default' template folder. This folder should be appropriately named, such as 'My Company WebMail'. This is important as installing future software updates may result in the default template being updated. This means that without correctly creating a copy of the default template folder, you may lose your changes when you next install an update. You will also need to update the WebMail service settings to use this new template folder.

Language Translations #

WebMail currently supports 89 different language translations. These are built into the settings system so the list of supported languages is fixed. If you want to suggest a new language you would like to be added to Ability Mail Server or any corrections to existing translations, please Contact Us.

Changing the Default Language

The default language is the language that is used before you have logged when a user specific language is not yet known, or if for some reason a user specific language has not been chosen correctly. The default language can be changed by opening the 'assets/config.json' file at the root of the WebMail template and changing the 'defaultLanguage' option to any valid language code. See below for a list of all supported language codes.

Changing Language Translations

Within the "content" folder of the WebMail template is a subfolder for each supported language, each with several language files for the various parts of WebMail. The file format is JSON which is a simple list of key / value string pairs.

Example 'en' JSON content from 'modals.json':

    "cancel": "Cancel",
    "no": "No",
    "ok": "Ok",
    "yes": "Yes"

The first of the string pairs on each line is the key; this must not be changed as WebMail looks for this key for specific translations. The second of these strings is the actual translation that will be used. You can refer to other languages such as en-US for the original English translations to help you customize your other language translations.

Example 'es' JSON content from 'modals.json':

    "cancel": "Cancelar",
    "no": "No",
    "ok": "Vale",
    "yes": "Sí"

Escaping Special Characters

You can change the translations as you like but make sure any " or \ characters in the translation are escaped with a pre-pended backslash (e.g. \" or \\) so that the JSON knows that these are quotes and backslashes in the translation and not the end of the translation string.

Example 'ro' JSON content from 'validation.json' using \" instead of " to escape the quotes:

    "emailAddressList": "Trebuie să fie o listă de adrese de e-mail validă (separate prin \";\")",

Example 'uk' JSON content from 'countries.json' using \\ instead of \ to escape the backslash:

    "VN": "В\\'єтнам",

Supported Languages #

Please see below for a list of currently supported languages:

Language Code Language Name
af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
as Assamese
az Azerbaijani
bn Bangla
bs Bosnian
bg Bulgarian
yue Cantonese (Traditional)
ca Catalan
lzh Chinese (Literary)
zh-Hans Chinese Simplified
zh-Hant Chinese Traditional
hr Croatian
cs Czech
da Danish
prs Dari
nl Dutch
en English
et Estonian
fj Fijian
fil Filipino
fi Finnish
fr-CA French (Canada)
fr French
de German
el Greek
gu Gujarati
ht Haitian Creole
he Hebrew
hi Hindi
mww Hmong Daw
hu Hungarian
is Icelandic
id Indonesian
iu Inuktitut
ga Irish
it Italian
ja Japanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Central)
kmr Kurdish (Northern)
lo Lao
lv Latvian
lt Lithuanian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
my Myanmar (Burmese)
ne Nepali
nb Norwegian
or Odia
ps Pashto
fa Persian
pl Polish
pt Portuguese (Brazil)
pt-PT Portuguese (Portugal)
pa Punjabi
otq Querétaro Otomi
ro Romanian
ru Russian
sm Samoan
sr-Cyrl Serbian (Cyrillic)
sr-Latn Serbian (Latin)
sk Slovak
sl Slovenian
es Spanish
sw Swahili
sv Swedish
ty Tahitian
ta Tamil
te Telugu
th Thai
ti Tigrinya
to Tongan
tr Turkish
uk Ukrainian
ur Urdu
vi Vietnamese
cy Welsh
yua Yucatec Maya