Quantcast
Channel: Webkul Blog
Viewing all articles
Browse latest Browse all 5551

Show Different Language Flags instead of Dropdown Magento

$
0
0

1. Goto app/design/frontend/[theme-directory]/template/page/switch/

2. Open file “languages.phtml” replace the code with the following code.

<style type="text/css">
	.langs-wrapper{float:right;height:15px;margin-right:20px;}	 
	.lang-flag{border:1px solid transparent;display:inline-block;height:13px;}	 
	.lang-flag:hover{border:1px solid #FFF;}
</style>
<?php if(count($this->getStores())>1): ?>
<div class="form-language">
    <div class="langs-wrapper">
    <?php foreach ($this->getStores() as $_lang): ?>
        <?php if ($_lang->getCode() != 'default'): ?>
        <a class="lang-flag" href="<?php echo $this->getCurrentUrl().'?___store='.$_lang->getCode();?>" style="text-decoration:none;" title="<?php echo $_lang->getCode();?>">
        	<img src="<?php echo $this->getSkinUrl('images/flags/'.$_lang->getCode().'.gif');?>" alt="<?php echo $_lang->getCode();?>">
        </a>
        <?php endif;?>
    <?php endforeach;?>
    </div>
</div>
<?php endif;?>

3. Put Your Country Flag Images inside “flag” directory in skin/[theme]/images/folder and name it as the store view code.

Enjoy.

Facebook Twitter Email Reddit Stumbleupon

Viewing all articles
Browse latest Browse all 5551

Trending Articles