I'm building a bilingual website (French/English). I created the "user biography" for me to display later in the view. The biography is translated.

The view is called in the page : biography.php?id_author=405 with a contextual filter (405 in this example). Now when we click to see the other language version, we are redirected to "biographie.php" (in french), but we lose the parameter.

How can i keep the parameter ?


1 Answer 1


I decided to "patch" the code, by adding the paramaters using Javascript.

 if($('.language-link').length > 0 && location.search != ""){
            var href = this.href;
            if (href.indexOf('?') != -1) {
                href = href + location.search;
              else {
                href = href + location.search;
              $(this).attr('href', href);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.