navigator.language
.To redirect users to a specific URL based on their browser language in Webflow, you’ll need to use custom code—Webflow doesn’t currently offer built-in language detection or redirect features.
example.com/en
, French to example.com/fr
).navigator.language
) for detection.Go to Project Settings > Custom Code and place your script in the Footer section, or use Page Settings > Custom Code if it's for a specific page only.
Use a short JavaScript snippet like:
```javascript
```
This redirects based on whether the browser language starts with 'fr'
, 'es'
, or defaults to English.
To redirect based on language in Webflow, add a custom JavaScript snippet that checks navigator.language
and redirects accordingly. Apply the script only where needed to prevent redirect loops.