/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2014 *
+ * Copyright (c) 2001-2016 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
// var liee a la langue
$l = $GLOBALS['meta']['langue_site'];
if (!$fichiers_lang = chercher_module_lang($module, $l))
- $fichiers_lang = chercher_module_lang($module, 'fr');
+ $fichiers_lang = chercher_module_lang($module, _LANGUE_PAR_DEFAUT);
if ($fichiers_lang) {
$GLOBALS['idx_lang']='i18n_'.$module.'_' .$l;
if (empty($GLOBALS[$var])) {
charger_langue($lang, $module);
- // surcharge perso -- on cherche (lang/)local_xx.php ...
- if (!isset($local['local_'.$lang]))
+ // surcharge perso
+ // -- on cherche (lang/)local_xx.php ...
+ if (!isset($local['local_'.$lang])) {
+ // redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer)
+ $GLOBALS['idx_lang']= $var;
$local['local_'.$lang] = chercher_module_lang('local', $lang);
+ }
if ($local['local_'.$lang])
surcharger_langue($local['local_'.$lang]);
// ... puis (lang/)local.php
// on essaie d'abord la langue du site, puis a defaut la langue fr
$langue_retenue = $lang;
if (!strlen($text)
- AND $lang !== 'fr') {
+ AND $lang !== _LANGUE_PAR_DEFAUT) {
if ($lang !== $GLOBALS['meta']['langue_site']) {
$text = inc_traduire_dist($ori, $GLOBALS['meta']['langue_site']);
$langue_retenue = (!strlen($text) ? $GLOBALS['meta']['langue_site'] : '');
}
else {
- $text = inc_traduire_dist($ori, 'fr');
- $langue_retenue = (!strlen($text) ? 'fr' : '');
+ $text = inc_traduire_dist($ori, _LANGUE_PAR_DEFAUT);
+ $langue_retenue = (!strlen($text) ? _LANGUE_PAR_DEFAUT : '');
}
}