1<?php 2 3namespace dokuwiki\plugin\deeplautotranslate; 4 5use dokuwiki\Menu\Item\AbstractItem; 6 7/** 8 * Class MenuItem 9 * 10 * Implements the translate button for DokuWiki's menu system 11 * 12 * @package dokuwiki\plugin\deeplautotranslate 13 */ 14class MenuItem extends AbstractItem { 15 /** @var string do action for this plugin */ 16 protected $type = 'translate'; 17 18 /** @var string icon file */ 19 protected $svg = __DIR__ . '/img/translate.svg'; 20 21 /** 22 * Get label from plugin language file 23 * 24 * @return string 25 */ 26 public function getLabel() { 27 $hlp = plugin_load('action', 'deeplautotranslate'); 28 return $hlp->getLang('btn_translate'); 29 } 30}