squirrelmail i18n

some initial notes on getting squirrelmail i18n to work

locales on the system:

locale aliases in squirrelmail:

universe of possible locales:

In /etc/locale.gen, the country code matters! If you put the wrong country code, then squirrelmail won’t load the translation. For example, if you pick es_MX, spanish translations don’t work. You have to pick es_ES for squirrelmail to show spanish.

In /etc/locale.gen, it does not appear the charset matters! So, you just need to match up the language plus country code that is in squirrelmail with an entry in locale.gen, but it doesn’t need to be the correct character set.

getting arabic to actually work

Modify the arabic aliases so that it will actually work (we need a country code because debian won’t install a language without a country).

The new way
codetitle. functions/i18n.php

$languages['ar']['NAME']    = 'Arabic';
$languages['ar']['CHARSET'] = 'utf-8';
$languages['ar']['DIR']     = 'rtl';
$languages['ar']['LOCALE']  = 'ar_EG';

The old way
codetitle. functions/i18n.php

$languages['ar_EG']['NAME']    = 'Arabic';
$languages['ar_EG']['CHARSET'] = 'utf-8';
$languages['ar_EG']['DIR']     = 'rtl';
$languages['ar']['ALIAS']      = 'ar_EG';

create a new locale for arabic that includes country code:

> cd locale
> cp -r ar ar_EG

codetitle. ar_EG/setup.php

$languages['ar_EG']['NAME']    = 'Arabic';
$languages['ar_EG']['CHARSET'] = 'utf-8';
$languages['ar_EG']['DIR']     = 'rtl';
$languages['ar']['ALIAS'] = 'ar_EG';

A while back a japanese user wrote to collective saying that he cannot send mail using Japanese characters, when he does, they come through totally illegible.

I took a look at it and found that Squirrelmail supports the japanese locale called: ISO-2022-JP, in Debian we have the following locale options: ja_JP, ja_JP.EUC-jp and ja_JP.UTF8. We had only the first one enabled. So as a test, I enabled the other two, but that didn’t seem to change anything. The user switched to using IMP because of this.

There is a special Japanese patch for squirrelmail, done by someone named ‘masato’, but from reading the lists, this was
incorporated into Squirrelmail itself, and not require a patch. I’ve looked at this patch and it is quite large, and I wonder if we its necessary or not.

It would be really good if we could figure this out, there is a pretty strong internationalization support community for Squirrelmail, and this masato person seems to be quite interested in making it work for people, so if its not obvious maybe we can ask for help.


The last code sinppet has “Windows-1256” encoding set for languages['ar_EG']['CHARSET']. It should be “utf-8” instead.


thanks Ahmad!