0

I have integrated html theme in Magento and now I have to add store language in my custom header part. How can I do this ? Can any one help me ?

  • You can use echo $this->getChildHtml('store_language') to get language switcher in your header.phtml – Jaimin Sutariya May 26 '17 at 4:44
  • yes i am already write this code in my form – H_Parekh May 26 '17 at 4:47
  • Can you add your form file code to the question with your layout xml file code to look for any issue. – Jaimin Sutariya May 26 '17 at 4:48
2

Directly Put code in .phtml file

<?php echo $this->getLayout()->createBlock('page/switch')->setTemplate('page/switch/languages.phtml')->tohtml(); ?>

OR

Add code in your custom layout (.xml) file or local.xml file

<default>
        <reference name="header">
            <block type="page/switch" name="custom_store_language" as="custom_store_language" template="page/switch/languages.phtml"/>
        </reference>
</default>

Add call using phtml file

<?php echo $this->getChildHtml('custom_store_language'); ?>
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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