Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

The best way to use language files?

 
Dror Astricher
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Dror,

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