[ http://issues.apache.org/struts/browse/STR-2897?page=comments#action_37652 ]
Paul Benedict commented on STR-2897: ------------------------------------ Okay, then I think I know what to do. Because S1/S2 has no shared architecture, I think the best solution is to come up with [A] differing implementations that [B] function identically and [C] function cooperatively. 1. Since Struts 1 does not have dependency injection, the locale resolver class needs to be specified in the struts controller. So I want to add a new element to the struts config file. 2. The resolver will not be accessible directly. It must be accessed through a proxy class. This proxy class will use dynamic reflection to detect these methods: http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/web/servlet/LocaleResolver.html We can swipe the interface (Apache 2.0 License) and provide it ourselves. That way people can implement it directly, but I heavy lean towards reflection to read the resolver object so that Spring implementations can be used too. This will allow S1/SPR/WW to be used together. That might sound a bit crazy, but people may have S1/S2 actions working with SPR portlet framework. This will allow people to provide any locale setting implementation they want. 3. Modify the RP/commands were appropriate to setup the locale on each request. 4. Deprecrate ActionForm.setLocale() for new version as in comment #2. > Rework Locale Resolution > ------------------------ > > Key: STR-2897 > URL: http://issues.apache.org/struts/browse/STR-2897 > Project: Struts 1 > Type: Improvement > Reporter: Ted Husted > Fix For: TBD > > Struts 1 locale resolution could be improvied to work more like Cantoo > [http://messages.cintoo.org/] and Struts 2. > Ideally, we should be able to share locale resolution between s1, s2, and > Spring, in the same application. > For background see, > WW/SAF2 i18n & Cintoo Messages > * http://www.mail-archive.com/dev%40struts.apache.org/msg23270.html > Locale resolver > * http://www.mail-archive.com/dev%40struts.apache.org/msg23273.html -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
