Hey everyone
I've searched the forums for a while but there's no simple explanation on how to do this.
I've created a thank you page an translated it with Joomfish. When I press the form submit button, then the language is removed. If I have chosen a spanish language, then when I press the form, the language will go back to default.
I saw somewhere that you can set the redirecturl in php code, but how can I do this? Then I could just use this:
Anyone?
I've searched the forums for a while but there's no simple explanation on how to do this.
I've created a thank you page an translated it with Joomfish. When I press the form submit button, then the language is removed. If I have chosen a spanish language, then when I press the form, the language will go back to default.
I saw somewhere that you can set the redirecturl in php code, but how can I do this? Then I could just use this:
<?php
$lang = &JFactory::getLanguage();
$redirecturl = "someredirecturl.php?lang=".$lang->get('name');
?>
Anyone?
Hi ronze,
The easy way os to use that code on the Thank you page with a switch
Bob
The easy way os to use that code on the Thank you page with a switch
switch ($lang) {
case 'Spanish':
default:
echo 'Thank you in Spanish';
break;
case 'English':
echo 'Thank you in English';
break
}
Bob
Yes, but that kind of breaks the idea of managing all translations with Joomfish. Because if it's not a simple thank you page, but a rather advanced one, Joomfish will to the job prettier.
My solution was to enter this code in the onSubmit field:
It appends the current language to the redirect url.
My solution was to enter this code in the onSubmit field:
<?php
$myForm->formrow->redirecturl .= '&lang='.JRequest::getVar('lang','en');
?>
It appends the current language to the redirect url.
This topic is locked and no more replies can be posted.