I need add a country selector in the header section, next to the currency selector. How is the right way to do this?


I realized that there was not much information in my question, so it was misunderstood. I apologize and give more information now:

I am developing a plugin for Magento 1.9 that needs to modify some information in the shop depending on the country of the customer. So I need to display an additional country selection box in the page header, that does not change the store view but only delivers the selection to my plugin. Also I will initialize the country through GeoIP.

The problem is that I am still not able to find a way to insert something in the top line of the page, next to the language and currency selectors. And of course this must work for any theme the final shop might install.

I have read something about blocks in Magento, but I am not sure which block to choose and how this would work without having to create a theme of my own. I cannot deliver the plugin with a separate theme, obviously. And do I have to overwrite this block completely or can I append to it?

My layout XML file (frontend/base/default/layout/pluginname) looks like this:

<?xml version="1.0"?>
        <reference name="header">
            <reference name="top.container">
                <block type="page/switch" name="my_country_switcher" template="myplugin/controlcountry.phtml"/>

This displays the selection box on the Home page below the category menu: How it is now

but what do I need to change to make it show here: Where I want it

Any pointers in the right direction are welcome.

1 Answer 1


”Language switcher” (country selector) which you can see in the top corner in the header frontend section is Magento’s standard store view switcher.
You can, for example, configure 3 store views (each with a different language) in your Magento and the store view switcher will appear automatically and will work as language switcher or the country selector in the frontend of your store.

The same is with currency switcher – you just need to configure more than one currency in your Magento.

That also means no more than one language installed, language switcher or the country selector won't auto-show.

  • Sorry, this is not what I needed. I edited the question to be more specific. Commented Mar 8, 2019 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.