# Issue with: Redirect based on browser language, but with a manual override

**URL:** <https://forum.wixstudio.com/t/issue-with-redirect-based-on-browser-language-but-with-a-manual-override/52263>\
**Category:** Ask the community\
**Tags:** wix-studio, code, question\
**Created:** [September 7, 2023, 6:53pm UTC](https://forum.wixstudio.com/t/issue-with-redirect-based-on-browser-language-but-with-a-manual-override/52263 "2023-09-07T18:53:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmormina](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bmormina/32/82445_2.png) [@bmormina](https://forum.wixstudio.com/u/bmormina)\
**Post date:** [September 7, 2023, 6:53pm UTC](https://forum.wixstudio.com/t/issue-with-redirect-based-on-browser-language-but-with-a-manual-override/52263/1 "2023-09-07T18:53:59Z")

</div>

Hello,

I followed this tutorial and was able to implement the auto-language switch successfully:

> [@Auto-Detect Language Based off Browser (SOLVED!)](https://forum.wixstudio.com/t/auto-detect-language-based-off-browser-solved/17900):
>
> Hello, I’m doing some testing with Corvid to see how I can get it to auto-detect the language of the visitor by using the browser default and then displaying the site in that language (Using Wix Multilingual). I followed [this tutorial](https://support.wix.com/en/article/corvid-tutorial-redirecting-visitors-based-on-browser-language) and it works great in detecting/displaying the language. However the entire function repeats endlessly which means the site reloads every 6500 nanoseconds to show the language it just detected. How do I get it to only do this once? One thought I just had was th…

My issue is that some users will WANT to browse in a language different from their browser language.

Example: a user with an “fr” browser wants to read content in English, it will automatically redirect them back to French…

**Can this be overriden?**  
Is there some stipulation I can add that prompts WIX to switch lanuage automatically ONLY on the _first_ page load? User can then change language at will.

_ **FYI: I am not using wix-multilingual.** _

* * *

Preview of my code below:

> **Summary**
>
> import wixWindow from ‘wix-window’;  
> import wixLocation from ‘wix-location’;
> 
> $w.onReady(function () {
> 
> let url = wixLocation.url;  
> if (url === ‘[https://www.URL.com/](https://www.URL.com/)’) {
> 
> switch (wixWindow.browserLocale) {
> 
> case ‘fr’:  
> case ‘fr-CA’:  
> case ‘fr-FR’:  
> case ‘fr-CH’:  
> case ‘fr-LU’:  
> case ‘fr-MC’:  
> case ‘fr-BE’:  
> wixLocation.to(‘[https://www.URL.com/accueil](https://www.URL.com/accueil)’);  
> break ;
> 
> case ‘es’:  
> case ‘es-ES’:  
> case ‘es-CR’:  
> wixLocation.to(‘[https://www.URL.com/inicio](https://www.URL.com/inicio)’);  
> break ;  
> }  
> }
> 
> else if (url === ‘[https://www.URL.com/](https://www.URL.com/)’){  
> switch (wixWindow.browserLocale) {  
> case ‘en’:  
> wixLocation.to(‘[https://www.URL.com/](https://www.URL.com/)’);  
> break ;  
> }  
> }  
> });

* * *

_Thanks in advance for any insight you may have._
