I am trying to show currency switcher in custom template file.
I referred some links and found for magento1.
Where they used below code in the template files.
<?php echo $this->getLayout()->createBlock('directory/currency')->setTemplate('directory/currency.phtml')->toHtml();?>
Same code i tried in magento2, which is not working.
I have tried this also in my template file.
<?php echo $block->getLayout()->createBlock('directory/currency')->setTemplate('directory/currency.phtml')->toHtml();?>
Which is not working.
Can anyone help me is there any other way to achieve this functionality.
Thanks!!