1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-22 13:28:32 +03:00

Merge remote-tracking branch 'lenormf/gh-pages-local-lang' into gh-pages

This commit is contained in:
Maxime Coste 2018-11-25 22:55:24 +11:00
commit 3bf01958b1

View File

@ -196,8 +196,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);
}
})();