Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

bilingual questionnaire data - database or resources file  RSS feed

 
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: 37180
515
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.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!