Questions and answers from the Weglot team


Bailie (Customer)

Re: How to redirect users based on browser language using javascript

How can I auto redirect users based on their browser language settings.

Max (Weglot Support)

Hi!

To activate the auto-redirection, you just have to add this to your setup code:
autoSwitch: 1

Best,
:)

Bailie (Customer)

Hello Max, Autoswitch:1 does not autoredirect, anything am missing? Below is my code

Max (Weglot Support)

Hi!

I've been automatically redirected to the French version actually!
And my browser is in French!

So it works :)

Best,

READY TO GET STARTED?
The best way to understand the power of Weglot is to see it for yourself. Get your website multilingual live in minutes.
Cookies settings
We use cookies to collect and analyze information on site performance and usage, to provide social media features and to enhance and customize content and advertisements. Learn more with our Privacy policy
Necessary cookies

Some cookies are required to provide core functionality. The website won’t function properly without these cookies and they are enabled by default and cannot be disabled.

Non-necessary Cookie Settings

Any cookies that may not be particularly necessary for the website to function and is used specifically to remember preferences or to help us improve our website by collecting and reporting information on its usage.

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customize content and advertisements. Learn more with our Privacy policy