It is very hard to find any useful code to a working JavaScript Code, that redirects the user to the .html
file of their browser language preference.
So I have a website which is named index.html
and it is in english. And then I have another website in a folder de/index.html
which is in german. I want to redirect the user to the german website if he has set his browser language preference to german and let him stay on the english website if he has any other language set as his preference.
|-index.html
|-de
|-index.html