[-] CORE : fixed bug #PSCFV-5514 - Override of module language file type fr.php in theme

This commit is contained in:
Vincent Augagneur
2012-11-21 17:41:53 +01:00
parent 70f9f7ed3a
commit 2542260f64
+2 -3
View File
@@ -127,6 +127,7 @@ class TranslateCore
static $translations_merged = array();
$name = $module instanceof Module ? $module->name : $module;
if (!isset($translations_merged[$name]))
{
$filesByPriority = array(
@@ -138,16 +139,14 @@ class TranslateCore
// PrestaShop 1.4 translations
_PS_MODULE_DIR_.$name.'/'.Context::getContext()->language->iso_code.'.php'
);
foreach ($filesByPriority as $file)
if (Tools::file_exists_cache($file))
{
include_once($file);
$_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE;
$_MODULES = !empty($_MODULES) ? $_MODULES + $_MODULE : $_MODULE; //we use "+" instead of array_merge() because array merge erase existing values.
$translations_merged[$name] = true;
}
}
$key = md5(str_replace('\'', '\\\'', $string));
$cache_key = $name.'|'.$string.'|'.$source;