Member
Member
SuperDevy   01-11-2005, 01:10
#1

Because i'm french, i would have the great gallery zenphoto in french.
So i made some changes to the core application to enable multilang support, and to fix some bugs.

http://jtam.free.fr/gallerie/zenphoto-0.9-superdevy.zip

It would be nice to see a similar feature in next release triweb

Here, the list of my changes :


New file : /zen/index.php (this folder may not be clearly visible)


Implementation of multilanguage:

  1. New param in config.php line 24:

    $conf['lang'] = "fr";

  2. New function in "functions.php" line 15-25:

    // Load language file
    if (isset($conf['lang'])) {
    if ($conf['lang']!='en') {
    include("lang/" . $conf['lang'] . ".php");
    }
    }
    // For language translation
    function lang($txt='') {
    global $lang_text;
    return isset($lang_text[$txt]) ? $lang_text[$txt] : $txt;
    }

  3. New folder named "lang" with the first language file "fr.php".

  4. In "admin.php" and in each theme file, every visible text is remplaced :
    [i]english text[/i]
    become
    [i][/i]

TODO: enable translation for template ajax functions.


Bug fixed with mod_rewrite desactivate for admin.php:

  1. New var line 12:
    $adminpath = "http://" . $_SERVER['HTTP_HOST'] . WEBPATH . (zp_conf('mod_rewrite') ? "/admin/" : "/zen/admin.php");

  2. Change
    header("Location: http://" . $_SERVER['HTTP_HOST'] . WEBPATH . "/admin/?page=edit");
    to
    header("Location: " . $adminpath . "?page=edit");

TODO: $adminpath could be a constant.

Junior Member
Junior Member
flclsd   16-11-2005, 14:36
#2

Merci beaucoup Devy pour cette traduction...

Junior Member
Junior Member
Yop   20-11-2005, 14:47
#3

J'ai essayé d'utiliser cette traduction, mais j'ai un pb : impossible d'afficher les miniatures !!!
Celles-ci sont bien générées dans /cache mais ne s'affichent pas !! Une idée ?

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.