Skip to content
Snippets Groups Projects
Commit 70c47106 authored by Clément's avatar Clément
Browse files

update: auto select language

parent ddffb226
No related branches found
No related tags found
1 merge request!104Feature/internationalization
......@@ -8,6 +8,7 @@
/dist/lib/
/dist/oidc-client-config.json
*.iml
/www/
/www/*
!/www/index.html
package-lock.json
<!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" />
</head>
<body>
<script>
const langs = ['fr', 'en'];
const defLang = 'en';
const userLangs = (navigator.languages || [navigator.language]).map(
a => a.split('-')[0],
);
const selectedLang = userLangs.find(lang => langs.indexOf(lang) !== -1);
document.location.replace(selectedLang);
</script>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment