NEW Use common substitution rule for language to get translation in ODT
This commit is contained in:
parent
1ec5a5d0bf
commit
3b5a3915c4
@ -316,6 +316,14 @@ abstract class CommonDocGenerator
|
|||||||
'current_server_datehour_locale'=>dol_print_date($now,'dayhour','tzserver',$outputlangs),
|
'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;
|
return $array_other;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1027,6 +1027,7 @@ class Translate
|
|||||||
|
|
||||||
foreach($this->tab_translate as $code => $label) {
|
foreach($this->tab_translate as $code => $label) {
|
||||||
$substitutionarray['lang_'.$code] = $label;
|
$substitutionarray['lang_'.$code] = $label;
|
||||||
|
$substitutionarray['__('.$code.')__'] = $label;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $substitutionarray;
|
return $substitutionarray;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user