• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I18N concept in Struts ??

 
Ranch Hand
Posts: 264
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could anybody provide me information about I18N concept by Struts.

I have gone through the struts docs and checked that it is not using ResourceBundle but its own technique to accomplish I18N concept.

There is one class org\apache\struts\util\PropertyMessageResources.java.

Please check the documentation of this class.

There is one implementation note

"IMPLEMENTATION NOTE - This class trades memory for speed by caching all messages located via generalizing the Locale under the original locale as well. This results in specific messages being stored in the message cache more than once, but improves response time on subsequent requests for the same locale + key combination. "

What they are trying to make us understand from this note.

Is there anything special in Struts that it is better than simply using ResourceBundles.

Please explain if anybody has idea about this.
 
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is all transparent. All you have to do is create different message bundles for each locale. It will pull the text from the correct bundle based on the client's browser's locale.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For an example on Struts internationalization you can refer here.

Struts I18N using locale.
Struts Internationalization using browser settings.

regards
Struts Developer

 
reply
    Bookmark Topic Watch Topic
  • New Topic