public static function translateLayout(LayoutInterface $template, $locale, TranslatorInterface $translator = null)
    {
        if (null === $template->getTranslationDomain()) {
            $template = $template->getTranslation($locale);
        } elseif (null !== $translator) {
            static::injectTranslatorValues($translator, $template);
        }

        return $template;
    }
public static function translateLayout(LayoutInterface $template, $locale, TranslatorInterface $translator = null)
    {
        if (null === $template->getTranslationDomain()) {
            $template = $template->getTranslation($locale);
        } elseif (null !== $translator) {
            static::injectTranslatorValues($translator, $template);
        }

        return $template;
    }
public static function translateLayout ( LayoutInterface $ template , $ locale , TranslatorInterface $ translator = null ) { if ( null === $ template -> getTranslationDomain ( ) ) { $ template = $ template -> getTranslation ( $ locale ) ; } elseif ( null !== $ translator ) { static :: injectTranslatorValues ( $ translator , $ template ) ; } return $ template ; }
Translate the layout template with the translator.

@param LayoutInterface          $template   The template
@param string                   $locale     The locale
@param null|TranslatorInterface $translator The translator

@return LayoutInterface
Translate the layout template with the translator .