Friday 22 May 2015

Magento : How to change the language selector

Add following code in app/design/frontend/base/default/template/page/switch/language.phtml

<?php if (count($this->getStores()) > 1): ?>
    <ul>
        <?php foreach ($this->getStores() as $_lang): ?>
            <?php if ($_lang->getId() != $this->getCurrentStoreId()): ?>
                <li class="language-<?php echo $this->htmlEscape($_lang->getCode()); ?>">
                    <a href="<?php echo $_lang->getCurrentUrl() ?>"><?php echo $this->htmlEscape($_lang->getName()) ?></a>
                </li>
            <?php endif; ?>
        <?php endforeach; ?>
    </ul>
<?php endif; ?>

No comments:

Post a Comment