This commit is contained in:
syuilo
2018-05-17 15:41:07 +09:00
parent a090d6e820
commit 5c38084af5
4 changed files with 7 additions and 3 deletions

View File

@ -32,7 +32,7 @@
// Detect the user language
// Note: The default language is Japanese
let lang = navigator.language.split('-')[0];
if (!/^(en|ja)$/.test(lang)) lang = 'ja';
if (!LANGS.includes(lang)) lang = 'en';
if (localStorage.getItem('lang')) lang = localStorage.getItem('lang');
// Detect the user agent