Commit d1fdd685 authored by Robert Lord's avatar Robert Lord

Fix default language selection bug

parent 0f93ffcc
......@@ -41,6 +41,9 @@ under the License.
hash = hash.replace(/^#+/, '');
}
history.pushState({}, '', '?' + language + '#' + hash);
// save language as next default
localStorage.setItem("language", language);
}
function setupLanguages(l) {
......@@ -53,7 +56,6 @@ under the License.
// the language is in the URL, so use that language!
activateLanguage(location.search.substr(1));
// set this language as the default for next time, if the URL has no language
localStorage.setItem("language", location.search.substr(1));
} else if ((defaultLanguage !== null) && (jQuery.inArray(defaultLanguage, languages) != -1)) {
// the language was the last selected one saved in localstorage, so use that language!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment