wood burning stoves 2.0*
The moose likes Struts and the fly likes The best way to use language files? 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
Reply locked New topic
Author

The best way to use language files?

Dror Astricher
Ranch Hand

Joined: May 20, 2005
Posts: 31
Hi guys,

I'm using Struts and wondered, what is the best way to use language files?

1. Should I put it all in the database and then take it once into a Hashtable that will be saved in Session? Then I can use JSTL to get the variable very easy all over the application.
When the language change, the Hashtable will be loaded with the new language from the database.

2.Should I use text files to store the language variable? and then again once puting it into a hashtable and so on.

3.Can I use a properties file like the ApplicationResource in Struts to store the language variables?

4.Should I just hardcode the variable in different language Hashtables, and then assign the right Hashtable to the Hashtable I use in my Jsp?

Many thanks in advance and have a great day

Dror
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Hi Dror,

We have a forum dedicated to Struts.
You should have better luck with this question there.
I'll move it for you.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The best way to use language files?
 
Similar Threads
Resource Bundles
what's the difference between hashtable and hashMap
The best way to use language files?
Storing Files
Hash Tables