mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-25 21:16:38 +03:00
parent
775575958b
commit
9a6c39cac8
@ -124,8 +124,12 @@
|
||||
});
|
||||
|
||||
// Remember the language selected across page loads
|
||||
// or auto-detect it according to the curently set browser language
|
||||
var local_lang = (navigator.language || navigator.userLanguage).replace(/-.+$/, "");
|
||||
var stored_lang = window.localStorage.getItem("translation-lang");
|
||||
if (stored_lang in translations && stored_lang !== translation_lang) {
|
||||
translate_to_lang(stored_lang);
|
||||
} else if (local_lang) {
|
||||
translate_to_lang(local_lang);
|
||||
}
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user