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
New file : /zen/index.php (this folder may not be clearly visible)
Implementation of multilanguage:
New param in config.php line 24:
$conf['lang'] = "fr";
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;
}
New folder named "lang" with the first language file "fr.php".
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:
New var line 12:
$adminpath = "http://" . $_SERVER['HTTP_HOST'] . WEBPATH . (zp_conf('mod_rewrite') ? "/admin/" : "/zen/admin.php");
Change
header("Location: http://" . $_SERVER['HTTP_HOST'] . WEBPATH . "/admin/?page=edit");
to
header("Location: " . $adminpath . "?page=edit");
TODO: $adminpath could be a constant.