My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

Translation Guide

Stewart -

PROBLEM
I need to translate my Atmail installation into a language that is not offered by Atmail.

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version
  • Webmail Only Installations: Version 6.0 > Current Version

CAUSE

  • Translation requirement.

RESOLUTION

The purpose of this guide is to assist the translator in updating or creating language files to improve the language support of Atmail 7.

Files and Tools

The files used for translating in Atmail 7 are located in /path/to/atmail/webmail/application/modules/mail/languages/

The locale code is used for the language directory and files, .po (portable object) files and the binary compiled .mo (machine object) files, e.g., /FR/fr.po and /FR/fr.mo

Download Poedit from http://www.poedit.net/download.php available for Windows, Mac OS X and Linux.

Change some Poedit settings to enable it to parse .phtml template files and also default to PHP scripting language.

Go to Poedit→Preferences→Parser setup and add the ;*php (no space) and -L php

Now you need to download Atmail via the client portal, or download evaluation page. Extract and install, please view the install guide for further details on installing Atmail.

Translation process

Prepare the source code for translation if not already done.

Notice the $this→translate in the code. Wrap this around any text you want to be translatable. N.B. if a translated string is not available in the future, the original (English) string will be displayed.

Set absolute path to the source code you want to translate.

Make sure the filters are set to match the translate methods

Press ok

Click on 'update' this will search the source files for any missing keys in an existing file, or create a complete key list in a new one.

If all goes well you should see this error (actually a bug. it does indicate success)

You should see all the English keys and existing translations.

You can now start editing the translations. Blue indicates new text discovered, Mustard indicates Fuzzy guesses, Black indicates already translated strings.

Press save to save and compile the .mo file which the app uses for resolving the translations. Save the .po and .mo files to languages/'language code'/.

If folder name is accurate for the language code, then the new language should become immediately available throughout Atmail6, else check that the string for the name of the language is available by updating:

webmail/library/Atmail/Locale.php

Check that the language code is accurate and the same as specified in:

webmail/library/Zend/Locale.php

Testing the Translation

You should now be able to login and see the new language file applied. Text that has not yet been translated will appear in English or next closest language.

Some text may not yet be translatable and will become translatable in upcoming releases.

Accessing your Atmail instance should now include the new translation option on the login page's language field.

 

Have more questions? Submit a request

Comments