getLocalizedURL() fix for urls that contain query strings

Small change for the getLocalizedURL() to localize correctly current urls that contain query strings.