From 4c65be6f9293db99c01837cb76cd452d1780a536 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Thu, 15 Mar 2012 10:05:12 +0000 Subject: [PATCH] [-] BO : export pack of language : add override of PDF file lang git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14187 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Language.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/classes/Language.php b/classes/Language.php index 4ba0b37b6..0e948a7f4 100644 --- a/classes/Language.php +++ b/classes/Language.php @@ -237,12 +237,14 @@ class LanguageCore extends ObjectModel $lPath_from = _PS_TRANSLATIONS_DIR_.(string)$iso_from.'/'; $tPath_from = _PS_ROOT_DIR_.'/themes/'.(string)$theme_from.'/'; + $pPath_from = _PS_ROOT_DIR_.'/themes/'.(string)$theme_from.'/pdf/'; $mPath_from = _PS_MAIL_DIR_.(string)$iso_from.'/'; if ($copy) { $lPath_to = _PS_TRANSLATIONS_DIR_.(string)$iso_to.'/'; $tPath_to = _PS_ROOT_DIR_.'/themes/'.(string)$theme_to.'/'; + $pPath_to = _PS_ROOT_DIR_.'/themes/'.(string)$theme_to.'/pdf/'; $mPath_to = _PS_MAIL_DIR_.(string)$iso_to.'/'; } @@ -347,6 +349,11 @@ class LanguageCore extends ObjectModel if (!$check || ($check && (string)$iso_from != 'en')) { $files_theme[$tPath_from.'lang/'.(string)$iso_from.'.php'] = ($copy ? $tPath_to.'lang/'.(string)$iso_to.'.php' : ++$number); + + // Override for pdf files in the theme + if (file_exists($pPath_from.'lang/'.(string)$iso_from.'.php')) + $files_theme[$pPath_from.'lang/'.(string)$iso_from.'.php'] = ($copy ? $pPath_to.'lang/'.(string)$iso_to.'.php' : ++$number); + $module_theme_files = (file_exists($tPath_from.'modules/') ? scandir($tPath_from.'modules/') : array()); foreach ($module_theme_files as $module) if ($module !== '.' && $module != '..' && $module !== '.svn' && file_exists($tPath_from.'modules/'.$module.'/'.(string)$iso_from.'.php'))