We had need to use the language form bundled with the FormExtra plugin yesterday to build a microsite that needs to handle 4 languages. However, trying to implement the form resulted in the following error:
sfValidatorI18nChoiceLanguage does not support the following options: 'culture'.
The bug is logged in the Symfony ticket system but is not fixed yet. There is a patch at the link over there, but to be honest, it's just as easy to manually correct it until a new release fixes it.
Basically, change a line in the sfFormLanguage::configure() method from:
$this->setValidators(array( 'language' => new sfValidatorI18nChoiceLanguage(array('culture' => $this->user->getCulture(), 'languages' => $this->options['languages'])), ));to
$this->setValidators(array( 'language' => new sfValidatorI18nChoiceLanguage(array('languages' => $this->options['languages'])), ));
Problem solved :)
Nice one ....solved my error
ReplyDeleteThanks for this !!
ReplyDeleteThanks Matt.
ReplyDeleteGlad to have helped :) Thanks for commenting
ReplyDeleteThx man, problem solved... Greetings from venezuela
ReplyDeleteThanks for info ;) .. from spain
ReplyDelete