/ Published in: PHP
- Mage 1.7* flag storeswitcher
- images/flags/flag_[storeview_name].png
- images/flags/flag_[storeview_name].png
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<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; ?>