We have a legacy application that uses Struts 1.2.9. The app is currently internationalized the standard way - .properties
files for all UI labels, errors, messages, etc; <message-resouces>
definition for each .properties file in struts-config.xml
using default Factory
& MessageResources
definitions; <bean:message>
usage in all JSPs. This has worked great till now, but for the fact that the application itself a framework for services used by a few hundred (yes 100's!) other applications internally.
We have a requirement to extend the i18n functionality as follows:
- Define a custom directory for
.properties
files - so this would be outside the scope of the classpath; basically not inside the.war
package. The idea is to support just message string changes w/o really having to redeploy the entire application. - This custom directory will also contain per supported applications messages - this could be just a subset of the existing ones or the entire set of resources tailored specifically to that application.
- Custom way of supporting per request basis
Locale
setting - barring all other considerations (default stack, classpath/package lookups, etc.) this is analogous to the wayI18nInterceptor
works in Struts2 with therequestOnlyParameterName
attribute set totrue
.
Yes, I do understand that a few 100 bundles loaded at the same time will be memory intensive, but that is acceptable in our case.
Any help is appreciated - be it direction, sample code, etc.
Note: I completely agree that moving onto a newer UI platform is probably the best solution. But we can't.
TIA.