fixed lang switcher (dirty)

This commit is contained in:
Naeltard 2015-04-03 02:11:07 +02:00
parent 7d85633901
commit 0306595461

View File

@ -4,9 +4,9 @@ function switchLocale(locale){
function reloadWithQueryStringVars (queryStringVars) {
var existingQueryVars = location.search ? location.search.substring(1).split("&") : [],
currentUrl = location.search ? location.href.replace(location.search,"") : location.href,
newQueryVars = {},
newUrl = currentUrl.replace(/#/g, "#") + "?";
//currentUrl = location.search ? location.href.replace(location.search,"") : location.href,
newQueryVars = {},
newUrl = "http://www.slingit.org/?_lang="+queryStringVars._lang+"#";
if(existingQueryVars.length > 0) {
for (var i = 0; i < existingQueryVars.length; i++) {
var pair = existingQueryVars[i].split("=");