<?php

namespace Internetgalerie\IgDatapoolFe\ViewHelpers;

/**
 * Extends the TranslateViewHelper
 *
 * Why is this one different to ig_render? Here we first check the local extension and THEN the ig_render.
 * In ig_render it is the other way around.
 *
 * @api
 * @author     Markus Baumgartner <mb@stylesheep.ch>, Internetgalerie AG
 * @package    IgDatapoolFE
 * @subpackage ViewHelpers
 */
use Internetgalerie\IgDatapoolFe\Services\LangService;

class TranslateViewHelper extends \Internetgalerie\IgCoreViewhelpers\ViewHelpers\TranslateViewHelper
{
    public function render() : string
    {
        $out = LangService::ll($this -> arguments['key'], 'ig_datapool_fe', 'main', $this->arguments['arguments']);
        if ($out) {
            return $out;
        }
        return parent::render();
    }
}
