ContentNegotiation.fwaction (2008-07-20) (Downloaded 20 times)
Compatible: Pro 4 and Pro 5
Author: Walter Davis
Content Negotiation is an optional feature of the Apache Web server. It allows you to provide the same content in different languages, relying on the browser’s preferences to determine which language to send – all automatically. This Action automates the production of the index.var file that tells Apache which languages your site supports.
This folder Action reads all the pages in the folder it’s applied to (or the entire site) and looks for files named in this manner:
index_en.html index_es.html index_alternative.html
When it finds one or more, it generates an index.var file listing them and defining the language they correspond to.
The index.var file looks like this:
URI: index_en.html Content-type: text/html Content-language: en URI: index_es.html Content-type: text/html Content-language: es URI: index_alternative.html Content-type: text/html
The Apache Web server, when properly configured, will poll the browser for language preferences, and only serve up the one language that matches. If no match can be found, the content of index_alternative will be shown instead.
Learn more about content negotiation and configuring Apache at the Apache documentation Web site.