good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Language Negotiation with mod_perl, Apacheby penguinfuz (Pilgrim) |
on Jan 30, 2003 at 12:09 UTC ( [id://231285]=perlquestion: print w/replies, xml ) | Need Help?? |
penguinfuz has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow monks -- I seek all wisdom and advise! I am serving a website in (2) languages, and wish to do so without requiring the visitor to make the selection. I have shifted the heavy lifting to mod_perl because visitors who have no language support for either of my translations get a nasty 406 error. Limitation of multiviews (as implemented in Apache 1.x). So... Easy enough with mod_perl <grin> My request for advise is this: Which operation would be more costly, checking the contents of $r->header_in('Accept-Language') with a regexp (de and en for example) or just tacking on the default language (with a low quality rating) for all request and forget about it! The website has a considerable amount of traffic and of course I want to keep all access 'snappy'. Obligatory code example: Or...
Back to
Seekers of Perl Wisdom
|
|