From: Matthias Schmidt Date: Sat, 13 Jan 2018 16:24:50 +0000 (+0100) Subject: Add language item support of selection form field options X-Git-Tag: 5.2.0_Alpha_1~862 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00be8751dffd70ca5c9f380ea387e4768a12964c;p=GitHub%2FWoltLab%2FWCF.git Add language item support of selection form field options See #2509 --- diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php index 8538c77c01..b90e1b5828 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/TSelectionFormField.class.php @@ -1,6 +1,7 @@ $value) { if (is_array($value)) { $validateOptions($value); @@ -73,6 +74,11 @@ trait TSelectionFormField { } $this->possibleValues[] = $key; + + // fetch language item value + if (preg_match('~^([a-zA-Z0-9-_]+\.){2,}[a-zA-Z0-9-_]+$~', $value)) { + $array[$key] = WCF::getLanguage()->getDynamicVariable($value); + } } } };