Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re[2]: Language Negotiation with mod_perl, Apache

by penguinfuz (Pilgrim)
on Jan 31, 2003 at 10:01 UTC ( [id://231556]=note: print w/replies, xml ) Need Help??


in reply to Re: Language Negotiation with mod_perl, Apache
in thread Language Negotiation with mod_perl, Apache

WARNING: Comment Contains No Perl

CountZero, I was not aware that a default 'no language' variant could be returned reliably. I say 'reliably' because my understanding (and _some_ testing) showed that when the client did not list a language that I have translations for, Apache would return the variant based on it's alphabetical order.

Note that my test included file names such as:

index.html.de
index.html.en

And then I simply request index.html and let multiviews run. As described above, if I understand correctly, I could have files like:

index.html.de
index.html.en
index.html

And simply link to the pages like <a href="index">Go Here!</a> Unfortunately I have way too many links that would need to be modified for this to work. Hence the request header fiddling! ;)

Replies are listed 'Best First'.
Re: Re[2]: Language Negotiation with mod_perl, Apache
by CountZero (Bishop) on Jan 31, 2003 at 11:07 UTC

    It is even a bit more involved than that: you would really like to have a file called index.html.html to avoid that someone requests index.html and does not trigger the multiview-feature.

    Of course, you could write a Perl-script that modifies your links. (There now this comment has a Perl-content ;-) )

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://231556]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found