public function renderTranslatableTemplate($templateString)
    {
        if ($templateString instanceof Translation) {
            $origLang = $this->translator()->getLocale();
            foreach ($this->translator()->availableLocales() as $lang) {
                if (!isset($templateString[$lang])) {
                    continue;
                }
                $translation = $templateString[$lang];
                $isBlank = empty($translation) && !is_numeric($translation);
                if (!$isBlank) {
                    $this->translator()->setLocale($lang);
                    $translation = $this->renderTemplate($translation);
                    if ($translation !== null) {
                        $templateString[$lang] = $translation;
                    }
                }
            }
            $this->translator()->setLocale($origLang);
            $templateString->isRendered = true;

            return $templateString;
        } elseif (is_string($templateString)) {
            $isBlank = empty($templateString) && !is_numeric($templateString);
            if (!$isBlank) {
                return $this->renderTemplate($templateString);
            }
        }

        return '';
    }