Hi !
I created a form that is displayed on top of the pages site wide. It shows two buttons to switch between french and english. The site owners want very specific parts to be translated and different layouts depending on the selected language. What my form does is simply store the selected language in a session variable. Well, the form works like a charm, the only remaining problem is that I would like to redirect to the currently viewed page after submit (so the user just change the language and the current page gets reloaded in the selected language theme). If I leave redirect URL blank, I get a blank content, the same if I try to put a #. I tried the following in form code :
hopping that would override the form URLs setting but in vain.
Any idea ?
I created a form that is displayed on top of the pages site wide. It shows two buttons to switch between french and english. The site owners want very specific parts to be translated and different layouts depending on the selected language. What my form does is simply store the selected language in a session variable. Well, the form works like a charm, the only remaining problem is that I would like to redirect to the currently viewed page after submit (so the user just change the language and the current page gets reloaded in the selected language theme). If I leave redirect URL blank, I get a blank content, the same if I try to put a #. I tried the following in form code :
<?php
$currenturl = JURI::current();
$form->data['redirect_url'] = $currenturl;
?>
hopping that would override the form URLs setting but in vain.
Any idea ?