How can i show language switcher in both the header and the footer, but with a different template than in the header? I would like to have another phtml file, where I can customize it...

  • is this a very stupid question or a very hard one?
    – csba
    Commented Dec 12, 2019 at 9:22

1 Answer 1


I have found the solution. I have a footer block that has a template file called footer.phtml. In that file I added this code:

<div class="container">
    <?php echo $this->getLayout()->createBlock("Magento\Store\Block\Switcher")->setTemplate("Magento_Store::switch/languages_footer.phtml")->toHtml() ?>
  • This is the solution tho, but your point is valid, I will edit my answer to reflect this.
    – csba
    Commented Dec 12, 2019 at 11:51
  • You can mark this as your accepted answer after few hours. I would remove my above comment.
    – Jarnail S
    Commented Dec 12, 2019 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.