File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 6363use QueryUnion ;
6464use GlpiPlugin \Formcreator \Exception \ComparisonException ;
6565use Glpi \Application \View \TemplateRenderer ;
66+ use Plugin ;
67+
6668class DropdownField extends PluginFormcreatorAbstractField
6769{
6870 const ENTITY_RESTRICT_USER = 1 ;
@@ -713,6 +715,9 @@ public function parseObjectProperties(
713715 // We need english locale to search searchOptions by name
714716 $ oldLocale = $ TRANSLATE ->getLocale ();
715717 $ TRANSLATE ->setLocale ("en_GB " );
718+ if ($ plug = isPluginItemType ($ itemtype )) {
719+ Plugin::loadLang (strtolower ($ plug ['plugin ' ]), "en_GB " );
720+ }
716721
717722 $ item = new $ itemtype ;
718723 $ item ->getFromDB ($ answer );
@@ -774,6 +779,10 @@ public function parseObjectProperties(
774779 }
775780 // Put the old locales on succes or if an expection was thrown
776781 $ TRANSLATE ->setLocale ($ oldLocale );
782+ if ($ plug = isPluginItemType ($ itemtype )) {
783+ Plugin::loadLang (strtolower ($ plug ['plugin ' ]), $ oldLocale );
784+ }
785+
777786 return $ content ;
778787 }
779788
You can’t perform that action at this time.
0 commit comments