if (!$staticItem) return '';
if (isset($this->dynamicItems[$item])) {
+ // assign active language
+ $variables['__language'] = $this;
+
return WCF::getTPL()->fetchString($this->dynamicItems[$item], $variables);
}
* @see \wcf\system\template\IModifierTemplatePlugin::execute()
*/
public function execute($tagArgs, TemplateEngine $tplObj) {
- return WCF::getLanguage()->getDynamicVariable($tagArgs[0]);
+ if (($lang = $tplObj->get('__language')) === null) {
+ $lang = WCF::getLanguage();
+ }
+
+ return $lang->getDynamicVariable($tagArgs[0]);
}
}