From a86fe4e8f40e5391794d2c69279e41f9ac876822 Mon Sep 17 00:00:00 2001
From: Fil <fil@rezo.net>
Date: Wed, 16 Feb 2005 21:07:39 +0000
Subject: [PATCH] =?UTF-8?q?g=C3=A9n=C3=A9ralisation=20du=20module=20"local?=
 =?UTF-8?q?=5Ffr.php3"=20et=20suppression=20de=20la=20m=C3=A9thode=20lang?=
 =?UTF-8?q?=5Fperso...?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/inc_lang.php3 | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/ecrire/inc_lang.php3 b/ecrire/inc_lang.php3
index 40de2bc43a..b086ea55eb 100644
--- a/ecrire/inc_lang.php3
+++ b/ecrire/inc_lang.php3
@@ -46,15 +46,14 @@ function charger_langue($lang, $module = 'spip') {
 		}
 	}
 
-	// surcharge perso
-	if ($f = (find_in_path('lang_perso.php3')))
+	// surcharge perso -- on cherche le fichier local(_xx).php3 dans le chemin
+	if ($f = (find_in_path('local.php3')))
 		surcharger_langue($f);
-	if ($f = (find_in_path('lang_perso_'.$lang.'.php3')))
+	if ($f = (find_in_path('local_'.$lang.'.php3')))
+		surcharger_langue($f);
+	// compatibilite ascendante : chercher aussi local_xx.php3 dans ecrire/lang/
+	else if (@is_readable($f = _DIR_LANG . 'local_'.$lang.'.php3'))
 		surcharger_langue($f);
-
-	#	// Overkill ?  Surcharger uniquement le module demande
-	#	if ($f = (find_in_path('lang_perso_'.$module.'_'.$lang.'.php3')))
-	#		surcharger_langue($f);
 }
 
 //
-- 
GitLab