NEW Use common substitution rule for language to get translation in ODT

This commit is contained in:
Laurent Destailleur
2018-02-24 14:23:52 +01:00
parent 1ec5a5d0bf
commit 3b5a3915c4
2 changed files with 9 additions and 0 deletions

View File

@@ -316,6 +316,14 @@ abstract class CommonDocGenerator
'current_server_datehour_locale'=>dol_print_date($now,'dayhour','tzserver',$outputlangs),
);
foreach($conf->global as $key => $val)
{
if (preg_match('/(_pass|password|secret|_key|key$)/i', $keyfound)) $newval = '*****forbidden*****';
else $newval = $val;
$array_other['__['.$key.']__'] = $newval;
}
return $array_other;
}

View File

@@ -1027,6 +1027,7 @@ class Translate
foreach($this->tab_translate as $code => $label) {
$substitutionarray['lang_'.$code] = $label;
$substitutionarray['__('.$code.')__'] = $label;
}
return $substitutionarray;