File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes I18N concept in Struts ?? 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 "I18N concept in Struts ??" Watch "I18N concept in Struts ??" New topic
Author

I18N concept in Struts ??

Pawanpreet Singh
Ranch Hand

Joined: Jun 12, 2005
Posts: 264

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.
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
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.
Nyanas Kandhan
Ranch Hand

Joined: Jan 27, 2009
Posts: 35
For an example on Struts internationalization you can refer here.

Struts I18N using locale.
Struts Internationalization using browser settings.

regards
Struts Developer


regards,
Nyanaskandhan
 
jQuery in Action, 2nd edition
 
subject: I18N concept in Struts ??
 
Similar Threads
Struts: The Complete Reference - Internationalizaion ???
The best way to use language files?
struts 2 i18n Database based Message resource
help on struts I18N
is this not suppose to give me date of the week?