• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Struts2 - Custom implementation for i18n.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using struts2 for my project which implements i18n through following methods and tags:
a)getText()
b)<s:label>
c)<s:text>

But I want to have a custom implementation for i18n where in i would like to have the values for the keys to be read according to my custom implementation(e.g from HashMap) and not from the properties file.

The reason why I want to have custom implementation for i18n is because of the following :
a)There is a requirement to have an UI where the user will enter key/value pairs.
b)Once the user enters these values it must be reflected in the application.
For this we can generate the properties file with the user data from the UI. But this would require the following process to be executed:
a)The created properties file needs to be placed in the existing war file.
b)Application needs to be redeployed and restarted.
These things will have an impact on the production environment.


To achieve this i would like to know which would be the better approach:
a) Overriding the implementations of all the methods and tags implementing i18n.
or
b) Writing our own custom methods and custom tags to fetch values for the key according to our custom implementation.

Waiting for the feedback.

Thanks in advance.
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic