Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

Internationalization in the Model

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 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
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic