[dev] localization of special mailbox folders

PENZ Robert ROBERT.PENZ at TIROL.GV.AT
Thu Sep 25 11:12:11 UTC 2008


Dear Horde Team, 

We are implementing a Horde/DIMP based webmail system using the German localization. 

We came upon the issue that the special folder (Sent, Trash, Junk and Drafts) are displayed with their real names (IMAP Names) in Dimp’s sidebar. Our configuration requires us to use the English names for all default IMAP folders (Sent, Trash, Junk, Drafts), but we want them to be translated in the GUI.

Our attempt to accomplish this works as follows:

prefs.php
// drafts folder
$_prefs['drafts_folder'] = array(
    // The mailbox value must be encoded in the UTF7-IMAP charset (see RFC
    // 3501 [5.1.3]).
    // DVT am Server ist alles Englisch
    'value' => "Drafts",
    'locked' => false,
    'shared' => false,
    'type' => 'implicit');

DIMP.php, ca. line 430, at the end of _createFolderElt($elt) we add the following line:
// translate special folders using the translation framework
// example „Sent“ ⇒ „Gesendet“
//              „Trash“ ⇒ „Papierkorb“
    if ($ob->s == 1)
        $ob->l = _($elt['base_elt']['l']);   

Is there a better solution to our problem? This fix obviously does not translate the folders in IMP’s folders view. Furthermore, would it be possible to incorporate a feature which allows displaying other names (i.e. localized names) for special folders than their real names (IMAP folders)?

Mit freundlichen Grüßen
Robert Penz

----------------------------------------------------
Dipl. Inf. Robert Penz
DVT-Daten-Verarbeitung-Tirol GmbH
Adamgasse 22, 6020 Innsbruck
Tel: +43 512 508 3334 / Fax: +43 512 508 3355
eMail: robert.penz at tirol.gv.at


More information about the dev mailing list