Newer
Older
<!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>
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)");
}
const langs = ['fr', 'en', 'it'];
//Get the favorite language of the user's navigator
const userLangs = (navigator.languages || [navigator.language]).map(
function (a) { return a.split('-').shift() }
const selectedLang = userLangs.find(function(lang) { return langs.indexOf(lang) !== -1 });