Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bilingual questionnaire data - database or resources file

 
Preet Dhillon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement to build an online questionnnaire in two languages using Sturts 2 framework. The questions are a combination of various form fields (eg. text, dropdown, radio and checkboxes) - roughly 15-20 questions.

I am trying to figure out a way to generate the questions for this questionnaire. What is the best approach - storing the questions in the database or in the resources file?

Thank you in advance.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34422
347
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Resources seems better in case they add a third language. It also lets you use localization and internationalization features in Struts 2
 
Preet Dhillon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay- Thank you.

So the two examples I've found so far on the Struts site are following:

First one has the i18n but no dropdowns and checkboxes ets... http://struts.apache.org/development/2.x/docs/processing-forms.html

Second one had the all the elements and uses array to populate but no i18n - http://struts.apache.org/development/2.x/docs/struts-2-form-tags.html

Second form is closer to what I need but how would I include i18n to this?

My apologies - I am very new to Struts and have little experience with Java/jsp/servlets.

I've gone through all tutoraial on the this site and have good understing of individual elements but little confused on combining it all.

 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic