<?php
namespace wcf\system\form\builder\field;
use wcf\system\form\builder\field\validation\FormFieldValidationError;
+use wcf\system\WCF;
/**
* Provides default implementations of `ISelectionFormField` methods.
}
// validate options and read possible values
- $validateOptions = function($array) use (&$validateOptions) {
+ $validateOptions = function(array &$array) use (&$validateOptions) {
foreach ($array as $key => $value) {
if (is_array($value)) {
$validateOptions($value);
}
$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);
+ }
}
}
};