0) AND (file_exists("lang/art=$id_rubrique"."_$spip_lang.php3"))) { return "art=$id_rubrique:"; } else { return cherche_module_hierarchie($id_rubrique); } } // // Charger un fichier langue // function charger_langue($lang, $mod ='') { if (!$mod) $mod = 'spip'; include_ecrire ("lang/$mod"."_$lang.php3"); } // // Traduire une chaine internationalisee // function traduire_chaine($code, $args) { global $spip_lang; $var = "i18n_$spip_lang"; if (ereg('^(.+):(.+)$', $code, $regs)) { $mod = $regs[1]; $var = $mod."_$spip_lang"; $code = $regs[2]; } if (!$GLOBALS[$var]) charger_langue($spip_lang, $mod); $text = $GLOBALS[$var][$code]; //Deuxième passe if (!$text AND $mod) { $var = "i18n_$spip_lang"; if (!$GLOBALS[$var]) charger_langue($spip_lang, $mod); $text = $GLOBALS[$var][$code]; } if (!is_array($args)) return $text; while (list($name, $value) = each($args)) $text = str_replace ("@$name@", $value, $text); return $text; } ?>