mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
NEW Use common substitution rule for language to get translation in ODT
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1027,6 +1027,7 @@ class Translate
|
||||
|
||||
foreach($this->tab_translate as $code => $label) {
|
||||
$substitutionarray['lang_'.$code] = $label;
|
||||
$substitutionarray['__('.$code.')__'] = $label;
|
||||
}
|
||||
|
||||
return $substitutionarray;
|
||||
|
||||
Reference in New Issue
Block a user