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

The best way to use language files?

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You're not going crazy. You're going sane in a crazy word. Find comfort in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic