Showing results for 
Search instead for 
Did you mean: 

in the store language selection in the header

in the store language selection in the header



We want to make our shop in several languages.
When we add a store and a store view
this will be shown at the bottom of the footer
we would have it better in the header with country flag
Is that possible?
if yes how?





Re: in the store language selection in the header

Hi Matthias


To move the store view switcher from footer to header you need to follow below steps.


1) Assuming you have created custom theme and activates it for your webstore.


2) how to create custom theme refer this link -


3) Once the custom theme is active - create directory called "Magento_Theme" in app/design/frontend/Theme_Vendorname/Theme_name directory


4) Now In Magento_Theme directory create a directory called "layout" and in layout directory create a file called "default.xml".


5) So full path should be like this - app/design/frontend/Theme_Vendorname/Theme_name/Magento_Theme/layout/default.xml


6) Put below code in default.xml


<?xml version="1.0"?>
<page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<move element="store_switcher" destination="header-wrapper" after="top.links" />

7) run php bin/magento cache:clean command

8) run php bin/magento cache:flush command


Now store switcher will show on the header part.


To display the store flags instead of store view name , later on you can use this extension -


if issue solved, Click kudos/Accept as solutions.

if issue solved,Click Kudos & Accept as Solution

Re: in the store language selection in the header

This would be possible but it would require a developer. I don't think I've seen an Do you have Magento development experience or are in touch with someone that is?


There are some "Store-switching" tools, e.g. but it doesn't provide the country dropdown.

If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: in the store language selection in the header

To do it the easy way, use the following extension. It's easy to install, feature-rich and will allow you to display prompt box in header from where you can choose to switch to the desired store with local language and currency.

Re: in the store language selection in the header

I already have multiple stores

When a customer opens a website in France, that time website translates into French.

Store name:







For the language dropdown, I have used the google translate script.

See the below code:

<div class="google-language" id="switcher-language<?= $block->escapeHtmlAttr($id) ?>">
<label for="select-language"><?= $block->escapeHtml(__('Language:')) ?> </label>

<!-- Google Element Translator Styling-->
.goog-te-combo{width: px !important;}
.goog-te-balloon-frame{display: none !important;}
font{background: transparent !important;}
a font:hover{ color: !important;}
#google_translate_element{height: 26px !important;overflow: hidden !important;}
.goog-te-banner-frame{display: none !important;}
body{top: 0px !important;}

<!-- Google Element Translator -->
<div id="google_language_drop">
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
includedLanguages: 'en,it,es,fr,zh-CN',
}, 'google_translate_element');
<script type="text/javascript" src=""></script>

How to auto select dropdown as per customer geolocation.