Hi i try you patch but it not working because struts2 try to find UseMenuDisplayerTag.class Can you send me your new jar with th en new modifivation tx you
Robi-8 wrote: > > Hello. > > It seams that my previous emails of december didn't go through.. > so here it comes again. > > Hi guys. > > This is a patch to let switching locale in struts2.. > > if you store the ResourceBundle and then check for null, > it doesn't let the user switch Locale afterword, > as switching Locale requires calling ResourceBundle.getBundle() > with the desired Locale as a parameter. > > Thank you for this great library! > > Best regards and Happy New Year! > > -- > Robi > > Index: src/java/net/sf/navigator/taglib/UseMenuDisplayerTag.java > =================================================================== > RCS file: > /cvsroot/struts-menu/navigator/src/java/net/sf/navigator/taglib/UseMenuDisplayerTag.java,v > retrieving revision 1.16 > diff -u -r1.16 UseMenuDisplayerTag.java > --- src/java/net/sf/navigator/taglib/UseMenuDisplayerTag.java 4 Oct 2006 > 22:26:02 -0000 1.16 > +++ src/java/net/sf/navigator/taglib/UseMenuDisplayerTag.java 1 Jan 2008 > 17:54:05 -0000 > @@ -189,9 +189,12 @@ > Locale locale; > > if (localeKey == null) { > - // default to Struts locale > - locale = > - (Locale) > pageContext.findAttribute("org.apache.struts.action.LOCALE"); > + // default to Struts2 locale > + locale = (Locale) > pageContext.findAttribute("WW_TRANS_I18N_LOCALE"); > + if (locale == null) { > + // first fallback to Struts1 locale > + locale = (Locale) > pageContext.findAttribute("org.apache.struts.action.LOCALE"); > + } > if (locale == null) { > locale = pageContext.getRequest().getLocale(); > } > @@ -200,9 +203,6 @@ > } > mrDisplayerInstance.setLocale(locale); > > - if (rb != null) { > - mrDisplayerInstance.setMessageResources(rb); > - } else { > Object resources = pageContext.findAttribute(bundleKey); > > if (resources == null) { > @@ -216,7 +216,6 @@ > } else { > mrDisplayerInstance.setMessageResources(resources); > } > - } > } > > displayerInstance.setConfig(config); > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > struts-menu-user mailing list > struts-menu-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/struts-menu-user > > -- View this message in context: http://old.nabble.com/a-patch-for-struts2-i18n-tp15320407p32010794.html Sent from the struts-menu-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ struts-menu-user mailing list struts-menu-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/struts-menu-user