Screen shots

SquirrelMail Translator's Manual: Managing translations Next Previous Contents

2. Managing translations

2.1 Creating translations

You must have gettext installed. If it is not installed you can download the sources from ftp://ftp.gnu.org/pub/gnu/gettext/

Find the language code for the language you are going to translate into. A list of language codes can be found at http://lcweb.loc.gov/standards/iso639-2/langhome.html

If there is a 2 letter code for the language, use this.

You may also need country code, that can be found at http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html

Getting the template:

Create a directory squirrelmail/locale/language_code/LC_MESSAGES/. Copy squirrelmail/po/squirrelmail.pot into this directory and rename it to squirrelmail.po. This is the file that is going to be translated.

Doing the actual translation:

Translate strings

Convert the translated squirrelmail.po into a binary file by running the command "msgfmt -o squirrelmail.mo squirrelmail.po" in the directory where the translated squirrelmail.po is residing.

Add "-c" option to msgfmt command if you want to be sure that your translation is correct.

Making new translation available

Add the language name and language code to the array at the top of squirrelmail/functions/i18n.php.

Since SquirrelMail 1.5.1 new translations are enabled by creating file named setup.php in locale/<translation_code> directory. This file should contain $languages array entries and XTRA_CODE functions used by translation.

For example (locale/tlh/setup.php file):

$languages['tlh']['ALTNAME']='tlhIngan Hol';

Example (step by step)

How do I do it.


Send the language to the mailing list for inclusion with the official SquirrelMail package.

Helper scripts

There is also a small script in the po/ directory that can help in creating charset mappings from the mappings files that are provided by the Unicode consortium.

Next Previous Contents
© 1999-2016 by The SquirrelMail Project Team