mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
[Client] Better language detection
This commit is contained in:
parent
37bc254907
commit
dd09c3b394
@ -5,7 +5,7 @@
|
||||
const head = document.getElementsByTagName('head')[0];
|
||||
|
||||
// Detect user language
|
||||
let lang = ((navigator.languages && navigator.languages[0]) || navigator.language).split('-')[0].toLowerCase();
|
||||
let lang = navigator.language.split('-')[0];
|
||||
if (!/^(en|ja)$/.test(lang)) lang = 'en';
|
||||
|
||||
// Detect user agent
|
||||
|
Loading…
Reference in New Issue
Block a user