Back to Top

Show Different Language Flags instead of Dropdown Magento

Updated 13 March 2013

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.

Searching for an experienced
Magento Company ?
Find out More
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home