From 517e5e732cf9294a8a03897d65b76cd094d95fdb Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Thu, 25 Jul 2024 14:29:12 +0200 Subject: [PATCH] fix: load translation for extrafields in PDF (#30461) --- htdocs/core/class/commondocgenerator.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index ab8d1e36224..1d7008aae59 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1472,6 +1472,9 @@ abstract class CommonDocGenerator $field = new stdClass(); $field->rank = intval($extrafields->attributes[$object->table_element]['pos'][$key]); $field->content = $this->getExtrafieldContent($object, $key, $outputlangs); + if (isset($extrafields->attributes[$object->table_element]['langfile'][$key])) { + $outputlangs->load($extrafields->attributes[$object->table_element]['langfile'][$key]); + } $field->label = $outputlangs->transnoentities($label); $field->type = $extrafields->attributes[$object->table_element]['type'][$key];