How do I automatically redirect my visitors to their own language?
In this article, you'll learn how to automatically redirect your visitors to the version of your website that matches their preferred language.
1) What is the auto-switch feature?
Weglot offers an "auto-redirect" feature. When activated, it will automatically redirect visitors to a version of your website based on their browser's language, provided you manage this language in your Weglot project.
The redirection will not be based on the visitor's IP address.
2) How to activate the auto-switch feature?
All integrations
For all integrations, to activate this feature, go to your Weglot dashboard > General > Settings:
Once activated, visitors will be automatically redirected to their preferred language, provided you manage this language with Weglot. However, if you don't support the visitor's language, they'll be redirected to your website's original language as a fallback. You may change the fallback language if you wish.
Using WordPress
If you use WordPress, you can go to your WordPress admin > Weglot Plugin > Other options. Then, check the "Auto redirection" option and click on "Save Changes".
Using Shopify
If you use Shopify, you can go to your Shopify Dashboard > Apps > Weglot Translate> Other options. Then, check the "Auto Switch" option and click on "Save".
3) Using the auto-switch feature with the JavaScript integration
If you use Weglot with the JavaScript integration, take note that the browser will store a language cookie, so the website will always be displayed in the language version based on your last visit to the website.
So, if visitors have already visited your website in languages other than their browser's language, they will be redirected to the version of their last visit (unless they cleared their cookies).