diff --git a/inc/field/dropdownfield.class.php b/inc/field/dropdownfield.class.php index a4ce6a0a8..d30b23166 100644 --- a/inc/field/dropdownfield.class.php +++ b/inc/field/dropdownfield.class.php @@ -63,6 +63,8 @@ use QueryUnion; use GlpiPlugin\Formcreator\Exception\ComparisonException; use Glpi\Application\View\TemplateRenderer; +use Plugin; + class DropdownField extends PluginFormcreatorAbstractField { const ENTITY_RESTRICT_USER = 1; @@ -713,6 +715,9 @@ public function parseObjectProperties( // We need english locale to search searchOptions by name $oldLocale = $TRANSLATE->getLocale(); $TRANSLATE->setLocale("en_GB"); + if ($plug = isPluginItemType($itemtype)) { + Plugin::loadLang(strtolower($plug['plugin']), "en_GB"); + } $item = new $itemtype; $item->getFromDB($answer); @@ -774,6 +779,10 @@ public function parseObjectProperties( } // Put the old locales on succes or if an expection was thrown $TRANSLATE->setLocale($oldLocale); + if ($plug = isPluginItemType($itemtype)) { + Plugin::loadLang(strtolower($plug['plugin']), $oldLocale); + } + return $content; }