
If you want to create a multi-language store to sell worldwide be ready for a lot of work. You'll need to translate a lot of pages, localize banners and offers. But most importantly you'll need to cover the most basic of settings in this case — language switcher.
You can enable the language switcher in Magento by creating different store views. But people will still land on the default store.
To improve their experience you can switch them to a corresponding store view automatically. That's what we'll do today using the Automatic
.Configure Auto Language Switcher
Once you're ready, navigate to Stores > Configuration > Magefan Extensions > Auto Language Switcher and Enable the extension.
1. Fill out general settings
In the general section, you need to define how to switch the store view for visitors and whether to redirect them between one or multiple websites. Let's see what your options are.
Switch store view automatically
Choose the Auto Direct option for the Swither Mode if you want to redirect users to a store view in their local language automatically. In this case, you also need to specify when to redirect visitors: on first visit, or any visit in the Switcher Trigger.
Enable manual store view switching
If you select the Suggestion Popup option, visitors will see a popup and decide whether they want to switch. Additionally, you need to set Suggestion Popup Text in this case.
Finally, choose whether you want to Share Store View per website or globally.
If you choose to share store views Per Website customers will be directed to the store views within one website. However, if you choose Global, customers will be directed to the store views from different websites.
e.g. you have one website in English, Spanish, German languages, and the second website in English, Spanish, French. You set to Share Store View Globally.
In case a person from France comes to your first website they will be redirected to your second website since there's a French store view there.
2. Configure the restrictions
It's best if you keep the auto language switcher enabled for everyone, but not the bots and developers doing the testing. That's why you can choose what Pages to disable the auto stitching for: All Pages, Specified Pages, or All pages except specified pages.
Just choose a corresponding option and specify what User Agents and IPs you want to exclude from the auto language switching.
3. Set default language by country
By default, all users are directed to the default store view. Once you enable the auto language switcher in Magento, the extension will automatically redirect users based on their browser language or location. That's where you step in.
Assign certain store views to certain countries in the Default Store View By Country section. Or just leave the default browser language option for all countries.
e.g. you have English (EN) and French (FR) store view within one website. Then you set French store view for both France and Canada. In this case all visitors from these countries will land on the French store view.
However, if you set the FR store view for France and keep browser language for Canada, only visitors from France will be redirected to the FR store view. Users from Canada will land on either EN or FR store view, based on their browser language.
Note: if you don't set any store view for some countries, and you don't have any store views for them to be redirected based on the browser language, such visitors will just land on the default store view.
4. Configure GeoIP databases (if necessary)
To ensure proper GeoIP detection Magefan Language Switcher comes with the built-in GeoIP database. However, if you want to improve it even more, configure other available options — MaxMind and Cloudflare.
Just specify the Lisence Key for MaxMind and enable Cloudflare IP Geolocation if you use Cloudflare.
Don't forget to Save the settings and you're all set. The language switcher will direct people from different countries to the corresponding store view automatically.
Here's also a quick walkthrough if you want to see how we go through the configuration steps again:
5. Test language switcher
Finally, if you want to see how users will experience the redirect on your store, do the testing with our Location Simulator.
Note: make sure that all website caches are enabled before you do the testing.
For that go to GeoIP Database tab and scroll down to the Developer (Simulate Geolocation) section. Enter your IPs in the Allowed IPs field (separate them by a comma). Then choose the Simulate Country for the allowed IPs.
e.g. you set that visitors from your IP (though it's US) should be recognized as visitors from Argentina.
Save the settings once you finish and clean the browser cookies. However, it's best to open your website URL in the incognito tab.
You should land on a store view with the language you've set for the simulated country (in our case — Argentina).
If you've selected manual switching (Suggestion Popup) for your switcher, people will see the following popup before being redirected.

Example of the language switcher popup (not related to the configuration we've done for the example)
Don't forget to clear all Developer (Simulate Geolocation) fields once you finish the testing and clean Magento cache.
Now all your website visitors will land directly on the "right" store view, instead of searching for their language in the switcher manually. But that's to the only thing you should take care about.
The next step is to configure Magento currency switcher to make sure users see prices already in their local currency too. Not only does this improve user experience, but increase your chances of getting a sale.