From 95efe50dba66eef44798a79c00bed2dc415e979a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Feb 2012 13:28:19 +0100 Subject: [PATCH] New: If language code is none_NONE, trnalsation keys are kept not translated. --- htdocs/core/class/translate.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 2a24da9c0d5..bdd4f89b414 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -21,8 +21,6 @@ * \file htdocs/core/class/translate.class.php * \ingroup core * \brief File for Tanslate class - * \author Eric Seigne - * \author Laurent Destailleur */ @@ -165,6 +163,7 @@ class Translate dol_print_error('',get_class($this)."::Load ErrorWrongParameters"); exit; } + if ($this->defaultlang == 'none_NONE') return; // Special language code to not translate keys //dol_syslog("Translate::Load Start domain=".$domain." alt=".$alt." forcelangdir=".$forcelangdir." this->defaultlang=".$this->defaultlang); @@ -192,7 +191,7 @@ class Translate $langarray=explode('_',$langofdir); if ($alt < 1 && strtolower($langarray[0]) == strtolower($langarray[1])) $alt=1; if ($alt < 2 && (strtolower($langofdir) == 'en_us' || strtolower($langofdir) == 'fr_fr' || strtolower($langofdir) == 'es_es')) $alt=2; - + foreach($this->dir as $keydir => $searchdir) { // Directory of translation files