How to change image on locale base in magento?

Posted by Nil on Stack Overflow See other posts from Stack Overflow or by Nil
Published on 2010-01-07T09:20:05Z Indexed on 2010/03/19 3:01 UTC
Read the original article Hit count: 190

Filed under:
|

I want to change search image in magento. On search in magento the image name is btn_search.gif. Right now it take image from skin/frontend/default/default/images. And the file is /app/design/frontend/default/default/template/catalogsearch/form.mini.phtml where mention this tag as

<input id="search-button" type="image" src="<?php echo $this->getSkinUrl('images/btn_search.gif') ?>" alt="<?php echo $this->__('Search') ?>" />

I check the code and i found that we can pass locale as _type in this as

<input id="search-button" type="image" src="<?php echo $this->getSkinUrl('images/btn_search.gif', array('_type'=>'local')) ?>" alt="<?php echo $this->__('Search') ?>" />

But when i check the code this will just check in locale directory that this file exist in that locale or not. If this exist then it will take skin image. I want to use that locale image instead of that skin image.

So when i click on french store i get the image which is i set in /app/design/frontend/default/default/locale/fr_FR/images/btn_search.gif

I check the code for getSkinUrl in /app/code/core/Mage/Core/Model/Design/Package.php. And i found that he check locale for file but it return skin url.

Is there any method which return locale url ?

© Stack Overflow or respective owner

Related posts about magento

Related posts about php