I would not mix tag directive with action logic. Why don't you simply put localization keys inside ListItem value and after retrieve your localized values inside through struts tags?
For example: arraylist.add(new ListItem("Activity", "activity.name")); <s:text name="%{getText(activity.name)}"/> or alternatively struts could directly translate inside your action in this way: arraylist.add(new ListItem("Activity", getText("activity.name"))); (Although I prefer the first way) 2010/10/12 singh123 <vij...@rediffmail.com>: > > i want to display activities dynamically which can be increase or decrease on > struts 2 framework and that depend on the Locale (like English or French) . > dynamically means user can be expend or collapse (add or delete) activity at > run time. > > I have two properties file: > > messages.properties: > activity.name=activity > > messages_fr.properties: > activity.name=activity_fr > > for dynamic, i am using array list. i have an array list in a Java class. In > this list i want to store the values (activities) depending on the locale: > arraylist.add(new ListItem("Activity", "<s:text name="activity.name"/>")); > > When I retrieve the value on jsp like this: > <s:text name="activity.name"/> > > Am i going to right direction or any suggestion.. > > Thanks > -- > View this message in context: > http://old.nabble.com/Activity-can-display-dynamically-depend-on-the-locale-on-Struts-tp29941004p29941004.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Maurizio Cucchiara --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org