// PDF i18n
This commit is contained in:
@@ -161,7 +161,7 @@ abstract class HTMLTemplateCore
|
|||||||
die('Invalid iso lang ('.$iso.')');
|
die('Invalid iso lang ('.$iso.')');
|
||||||
|
|
||||||
if (@!include(_PS_THEME_DIR_.'pdf/lang/'.$iso.'.php'))
|
if (@!include(_PS_THEME_DIR_.'pdf/lang/'.$iso.'.php'))
|
||||||
die('Cannot include PDF translation language file : '._PS_THEME_DIR_.'pdf/'.$iso.'.php');
|
die('Cannot include PDF translation language file : '._PS_THEME_DIR_.'pdf/lang/'.$iso.'.php');
|
||||||
|
|
||||||
if (!isset($_LANGPDF) OR !is_array($_LANGPDF))
|
if (!isset($_LANGPDF) OR !is_array($_LANGPDF))
|
||||||
return str_replace('"', '"', $string);
|
return str_replace('"', '"', $string);
|
||||||
|
|||||||
@@ -1771,9 +1771,6 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
|
|
||||||
$i18n_dir = _PS_THEME_DIR_.'pdf/lang/';
|
$i18n_dir = _PS_THEME_DIR_.'pdf/lang/';
|
||||||
$i18n_file = $i18n_dir.$lang.'.php';
|
$i18n_file = $i18n_dir.$lang.'.php';
|
||||||
if (!file_exists($i18n_file))
|
|
||||||
if (!mkdir($i18n_dir, 0700))
|
|
||||||
die('Please create a "'.$lang.'" directory in '._PS_TRANSLATIONS_DIR_);
|
|
||||||
|
|
||||||
if (!file_exists($i18n_file))
|
if (!file_exists($i18n_file))
|
||||||
if (!file_put_contents($i18n_file, "<?php\n\nglobal \$_LANGPDF;\n\$_LANGPDF = array();\n\n?>"))
|
if (!file_put_contents($i18n_file, "<?php\n\nglobal \$_LANGPDF;\n\$_LANGPDF = array();\n\n?>"))
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
global $_LANGPDF;
|
||||||
|
$_LANGPDF = array();
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user