From 5f6bc0fe7ec2b79ef64195d939ac5a443e8cf00c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 Dec 2006 18:33:19 +0000 Subject: [PATCH] =?UTF-8?q?On=20prend=20le=20fran=E7ais=20comme=20langue?= =?UTF-8?q?=20alternative=20si=20la=20langue=20choisi=20et=20fr=5F*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/translate.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index fa7c4193009..ac8b625f95d 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -155,8 +155,11 @@ class Translate { if ($alt || ! $filelangexists) { // Repertoire de la langue alternative - if ($this->defaultlang != "en_US") $scandiralt = $this->dir."/en_US"; - else $scandiralt = $this->dir."/fr_FR"; + if ($this->defaultlang == "en_US") $scandiralt = $this->dir."/fr_FR"; + elseif (eregi('^fr',$this->defaultlang) && $this->defaultlang != 'fr_FR') $scandiralt = $this->dir."/fr_FR"; + elseif (eregi('^en',$this->defaultlang) && $this->defaultlang != 'en_US') $scandiralt = $this->dir."/en_US"; + else $scandiralt = $this->dir."/en_US"; + $file_lang = $scandiralt . "/$domain.lang"; $filelangexists=is_file($file_lang); $alt=1;