dhandlers and Language
Benjamin H Kram <[email protected]>
| Newsgroups | gmane.comp.web.mason.devel |
|---|---|
| Message-ID | <[email protected]> |
I've just written a perl module to do component level language negotiation. At present it expects to be used from within a dhandler - a request for '/index.html' will look at the Accept-Language header from the client, and try to grab the best match for the client's request (perhaps /index.html.es or /index.html.en-us). It allows you to override your browser's Accept-Language by starting your URI path with a language code. i.e.: http://www.foo.com/es/index.html will look for /index.html.es first, regardless of your Accept-Language preferences. The idea is that every component can have language specific versions, and mason will grab the best match, on a component by component basis. This works on the top level right now, but needs to happen for every component. a) Can I get dhandler functionality for all component requests, not just the top level? If not, b) would it be better to do this in the Resolver, and if so, what should I override? cheers, ben -- "Corporations, which should be carefully restrained creatures of the law and the servants of the people, are fast becoming the people's masters." -Pres. Grover Cleveland 4th Annual Message to Congress December, 1888 ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click