Ok, I did write a patch to LanguageShuntFactory. I attached the files in this mail.
- LanguageShuntFactory.java is the new patched LanguageShuntFactory - LanguageShuntFactory.java.old is the old LanguageShuntFactory (in current CVS) - LanguageShuntFactory.diff is diff file that can be applied to LanguageShuntFactory.java.old (or to the version that exists in repository. Changes: LanguageShuntFactory can now be initialized with default-language attribute like this: <maverick version="2.0" default-view-type="document"> <modules> <shunt-factory provider="org.infohazard.maverick.shunt.LanguageShuntFactory" default-language="en"/> </modules> </maverick> User can override default-language or Accept-Language headers by using request attribute: request.setAttribute("language", "en"); New LanguageShuntFactory tries at first to find a proper mode by using request attribute ("language"). Next it will try to find proper mode by using "default-language" attribute and finally it tries to find mode that matches to one of Accept-Language headers. If all these fail then it tries to find default mode. If also this fails, it will throw an exception. Kind regards Aapo -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aapo Laakkonen Sent: Thursday, September 25, 2003 3:16 PM To: [EMAIL PROTECTED] Subject: [Mav-user] Multiple shunts [1] and more dynamic LanguageShuntFactory [2] [1] http://www.mail-archive.com/[EMAIL PROTECTED]/msg00584.html [2] http://www.mail-archive.com/[EMAIL PROTECTED]/msg00545.html Has anyone done anything to these? I could do a patch to LanguageShuntFactory [2] to have override capability depending on Session language attribute. What should we do to case [1]? ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
LanguageShuntFactory.java
Description: Binary data
LanguageShuntFactory.java.old
Description: Binary data
LanguageShuntFactory.diff
Description: Binary data