Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts validations not kicking in Multi-Language application

 
Angelo Bonaparte
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have some DynaActionForms wth some validations defined in the struts-config.xml. My system is in English and French. The validations used to work whether I was in french or english but all of a sudden they validate only in the english language. I was just wondering where was the best place to look. Thanks.
 
Angelo Bonaparte
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I did a bit of debugging stepping thru Struts code and i've noticed that at startup the forms are set in in a form set within the ValidatorResources Object. Two lists are created, one for en_CA and one for fr instead of fr_CA? Possibly a problem. When I look at the lists the en_CA which is my default local it has all of my forms but the fr only has one. Does anybody have any idea why the validator plugin only puts the forms in the english en_CA list?
[ March 14, 2007: Message edited by: Angelo Bonaparte ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never used the Struts Validation Framework in a multi-language environment, but as I read the Struts Validator Guide I get the impression that you have to create a separate formSet for each locale in your validation.xml file. Try creating two formSets like this:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic