pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
174 stars 125 forks source link

Fix properties translations #3367

Closed stonebuzz closed 1 year ago

stonebuzz commented 1 year ago

Changes description

tag like ##answer_1.Serial_number## (to extract object properties)

no longer works when related object is come from plugin (ie: genericobject)

$TRANSLATE->setLocale("en_GB"); is not enought.

We need to load language for plugin too

Plugin::loadLang(strtolower($plug['plugin']), "en_GB");

otherwise, the list of search options for objects from plugins will be in the language of the logged-in user.

Checklist

Please check if your PR fulfills the following specifications:

References

Closes #N/A