0

We have a requirement where we have to internationalize the struts application based on the logged in user. Now the catch is, though the user may be from a different country with its own language, but still the user may use English as his preferred language which we will take from database. But each county has its own date formats (eg US MM/dd/YYYY or say countries in Asia as dd/MM/yyyy), zip or pin code, phone formats. The user cannot choose these, but are default as per the country.

We are planning to implement struts Internationalization concepts and add org.apache.struts.action.LOCALE as _en or _CN or anything as per his language preference when he logs in. But how can we inject the different formats into the loaded applicationResources. We can keep different ApplicationResources.properties for different combinations of language and formats but that would be a bad design.

We need application resources because all these will be used in the view jsps and its easier to access from there instead of always setting the in Action forms.

Has anyone solved this problem before please let us know. Thanks!!

Tatha
  • 1,253
  • 2
  • 24
  • 42

0 Answers0