wood burning stoves 2.0*
The moose likes Struts and the fly likes Internationalization in the Model Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Internationalization in the Model" Watch "Internationalization in the Model" New topic
Author

Internationalization in the Model

Bruce Berkowicz
Greenhorn

Joined: Mar 25, 2005
Posts: 1
I have a Struts question about i18n that I have not yet seen discussed: how to properly handle internationalization in the model? I can get the view to work (considering switching to Velocity with VelStruts).

When my app gets data from the data store (NOT a SQL database), it is passing data back to the view as caption/data pairs. Right now, the captions are hard-coded in my model Java code. I have to figure out how to access the correct resource bundle in the model.

Should I be passing the Locale object in from the Action?

Thanks in advance.

-Bruce
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
see the internationalization in the model shoudl be handled by urself........and its better to pass the locale object from the action clss to ur model

It all depends on the way in which u can distribute in MVC ....one more way is after getting data from the model , u can use the locale in action class itself to access the resource bundle and do something ....but i dont feel like its better to pass locale to the model
 
jQuery in Action, 2nd edition
 
subject: Internationalization in the Model
 
Similar Threads
passed 151/155!!!
NX: Where TableModel goes? -- Client GUI
MVC and my design
Information on Controller
Who should open the data connection?