/** * Perform a translation, based on text from shared admin file: /wire/templates-admin/default.php * * @param string $text * @return string * */ public function _($text) { static $translate = null; if (is_null($translate)) { $translate = $this->wire('languages') !== null; } if ($translate === false) { return $text; } $value = __($text, $this->wire('config')->paths->root . 'wire/templates-admin/default.php'); if ($value === $text) { $value = parent::_($text); } return $value; }