Magento storeswitch - flags
- Mage 1.7* flag storeswitcher
- images/flags/flag[storeviewname].png
Copy this code and paste it in your HTML
<?php if(count($this->getStores())>1): ?> <div class="form-language">
<!--span class="label">
<?php echo $this->__
('Your Language:') ?></span-->
<ul class="language-flags">
<li class="label">
<?php echo $this->__
('Your Language:') ?></li>
<?php foreach ($this->getStores() as $_lang): ?>
<?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' class="selected"' : '' ?>
<li><a href="
<?php echo $_lang->getCurrentUrl(false) ?>" title="
<?php echo $this->htmlEscape($_lang->getName()) ?>">
<img src="
<?php echo $this->getSkinUrl() ?>images/flags/flag_
<?php echo $this->htmlEscape($_lang->getCode()) ?>.png" alt="
<?php echo $this->htmlEscape($_lang->getName()) ?>"
<?php echo $_selected;
?> />
</a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
Report this snippet