in reply to content negotiation with Apache/cgi

With the CGI module, you can use the http() method to obtain the ACCEPT_LANGUAGE header from the client's request. Is that what you need?
use CGI qw/:standard/; # use one of the following forms $requested_language = http('Accept-language'); $requested_language = http('Accept_language'); # take action based on the client's list of acceptable languages ...

Replies are listed 'Best First'.
Re^2: content negotiation with Apache/cgi
by punkish (Priest) on Apr 24, 2007 at 14:48 UTC
    Right. That is part of what I need, assuming I can get to Accept-Language from CGI::Application.

    My task lies beyond that. Do I make Apache serve lang specific index.cgi (index.de.cgi or index.es.cgi and so on), or do I use a single index.cgi which somehow manages to serve different templates (welcome.en.tmpl or welcome.es.tmpl and so on). This is where my confusion lies, and here is where I welcome advice.

    --

    when small people start casting long shadows, it is time to go to bed