Hi,
I've done a multilanguage site and I made a form ( layout and class ) for italian lang, but I need the same form for eng lang...
I wish to solve the problem of traslating data and label and redirect page ( after submit form ) to landing page under right language site...
if ($flag_ricerca_ok==1)
Director::redirect('disponibilita-en/');
//Director::redirect('disponibilita-'.$lang.'/');
//echo "Disponibile";
else
Director::redirect('no-disponibilita-en/');
//Director::redirect($langSegment.'no-disponibilita-'.$lang.'/');
//echo "No Dispo";
}
So:
In Layout/HomePage.ss
<% if Locale == "en_GB" %>
<!-- Inglese Search Form -->
$DisponibilitaStep1EN_Form
<% end_if %>
<% if Locale == "it_IT" %>
$DisponibilitaStep1Form
<% end_if %>
and into Include dir , I've DisponibilitaStep1EN_Form.ss . The DisponibilitaStep1Form is rendered but other not when I'm in english site.
Under my_site/code, I've create class :
<?php
class DisponibilitaStep1EN_Form extends Form {.....
Thanks