This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'.
Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #91907] Wed, 20 January 2010 20:27 Go to next message
Strateg  is currently offline Strateg
Messages: 1
Registered: January 2010
Junior Member
Hello help mу please, and excuse for my terrible English.
There was such a very unpleasant problemm; decided to learn symfony, began with a project jobeet and everything seemed to be good ..... but then came to the localization and got here this error:
500 | Internal Server Error | InvalidArgumentException
sfValidatorI18nChoiceLanguage does not support the following options: 'culture'.
stack trace
• at ()
in SF_ROOT_DIR\lib\vendor\symfony\lib\validator\sfValidatorBase .class.php line 67 ...

64. // check option names
65. if ($diff = array_diff($optionKeys, array_merge($currentOptionKeys, $this->requiredOptions)))
66. {
67. throw new InvalidArgumentException(sprintf('%s does not support the following options: \'%s\'.', get_class($this), implode('\', \'', $diff)));
68. }
69.
70. // check error code names
not quote the rest, there are too many things written yet ....
To some, let us say version dismiss: to all the lessons that worked ... may not immediately but worked on the project doing the English version, so that's 19 a lesson, before the heading "Language Switching" everything worked, then made a written
$ Php symfony plugin: install sfFormExtraPlugin
command line returned success
put <? php include_component ( 'language', 'language')?>
checked - says there is no language ........ Well, not the essence, added a module filled components.class.php and opa this error crept ..... It seems the problem is in it as well, not working and not working and completed the lesson until the end ...... and still more of this error is not gone.
Removed <? Php include_component ( 'language', 'language')?> - Again, everything works.
I do not know what to do now, as a variant of what in the dock the pen in the lesson is written that it was intended that a version 1.3 or 1.4 and I have a 1.4.1 or as another option for what version sfFormExtraPlugin refreshed and more suited to symfony 1.4.1 but it is All versions are not professional, I hope the professionals who have gathered here all the same will help to understand what really happened
Thanks in advance
Re: Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #92039 is a reply to message #91907 ] Fri, 22 January 2010 15:06 Go to previous messageGo to next message
mrotta  is currently offline mrotta
Messages: 83
Registered: June 2007
Location: Alsace, France
Member
Use the "language" param instead of "culture".

And the param wait for an array.
Re: Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #92048 is a reply to message #91907 ] Fri, 22 January 2010 16:24 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Eek! please use paragraphing and [code] tags, I'm getting information overload here Shocked


Remember Palestine
Re: Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #94519 is a reply to message #91907 ] Mon, 01 March 2010 21:55 Go to previous messageGo to next message
bugeo  is currently offline bugeo
Messages: 2
Registered: February 2010
Location: Italy - Mantova
Junior Member
Hi
also i a get the same error:

sfValidatorI18nChoiceLanguage does not support the following options: 'culture'.


i find that the error is in the sfFormLanguage.class.php
at the row 102 and 106

From the api documentation i read that the sfValudatorI18n...
accept one option only: "language"

http://www.symfony-project.org/api/1_4/sfValidatorI18nChoice Language#method_configure


So remove the culture parameter

  public function configure()
  {
    $this->setValidators(array(
      'language' => new sfValidatorI18nChoiceLanguage(array('languages' => $this->options['languages'])),
    ));

    $this->setWidgets(array(
      'language' => new sfWidgetFormI18nChoiceLanguage(array('culture' => $this->user->getCulture(), 'languages' => $this->options['languages'])),
    ));
  }

[Updated on: Mon, 01 March 2010 21:59]

Re: Error: sfValidatorI18nChoiceLanguage does not support the following options: 'culture'. [message #99911 is a reply to message #94519 ] Thu, 27 May 2010 09:23 Go to previous message
sela  is currently offline sela
Messages: 24
Registered: November 2009
Location: London
Junior Member
i encountered the same problem and wonder why the plugin developer doesn't fix it?
Previous Topic:script for converting propel query to doctrine
Next Topic:MySQL error?
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software