We have a 1 site where there is 4 languages, 3 of which are in subfolders i.e
/
/de/
index.html
about-us.html
...
/fr/
index.html
about-us.html
...
/index.html
/about-us.html
...
The default EN language is not in a folder like the others (above), they are at the root.
I have the htaccess
code so far where I can detect the 3 languages via %{HTTP:Accept-Language}
and it works a treat.
The problem I have is that when they click the EN option in the nav (/
) the language detection kicks in via htaccess. How can I do it where if it has been clicked, I can tell .htaccess ignore the language detection?
I tried the HTTP_referer
route where I said if there was no referrer detected, detect the language and continue and if the referer was the website name, ignore it. That didn't work (too many redirects).
I don't have server side support as the files are actually all html files built via Gulp but WORSE case can use it if no other solution is available.