From 921df5f94fb0394e4453fcbe2dd43f5076bdf1f0 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 19 Apr 2010 09:45:53 +0000 Subject: [PATCH] Fix: Search if module directory name is different of lang file name we can use "langfile@mymodule" or "@mymodule" --- htdocs/core/translate.class.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/core/translate.class.php b/htdocs/core/translate.class.php index 7a965d4354a..ec7a165e7f7 100644 --- a/htdocs/core/translate.class.php +++ b/htdocs/core/translate.class.php @@ -148,6 +148,7 @@ class Translate { //dol_syslog("Translate::Load Start domain=".$domain." alt=".$alt." forcelangdir=".$forcelangdir." this->defaultlang=".$this->defaultlang); + $newdomain = $domain; $modulename = ''; // Search if module directory name is different of lang file name @@ -156,10 +157,6 @@ class Translate { $newdomain = (!empty($regs[1])?$regs[1]:$regs[2]); $modulename = (!empty($regs[1])?$regs[2]:''); } - else - { - $newdomain=$domain; - } // Check cache if (! empty($this->tab_loaded[$newdomain])) // File already loaded for this domain