<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=default,Array.prototype.includes,Array.prototype.find"></script> </head> <body> <script> if ((window.navigator.userAgent.indexOf("MSIE ") > -1 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) || window.navigator.userAgent.indexOf("Edge/") > -1) { alert("Please either update your Edge browser to the last version (>= 80, you can check that in ... -> Settings -> General) or switch to another browser (Chrome / Safari / Firefox)"); } //Language given in translation const langs = ['fr', 'en', 'it']; const defLang = 'en'; //Get the favorite language of the user's navigator const userLangs = (navigator.languages || [navigator.language]).map( function (a) { return a.split('-').shift() } ); userLangs.push(defLang); const selectedLang = userLangs.find(function(lang) { return langs.indexOf(lang) !== -1 }); //Redirection to the appropriate index.html document.location.replace(selectedLang); </script> </body> </html>