Multi-language content negotiation

Discussion in 'Feedback/Feature Requests' started by Marcus, Oct 13, 2008.

  1. Marcus

    Marcus New Member

    Hi,

    Are you planning on implementing multi-lingual content negotiation, e.g. by having files like

    index.en.html, index.fr.html or index.html.en, index.html.fr

    ?

    Being able to let the web-browser handle content (including cached content) based on the language(s) set in the Accept-Language header I think would be a really useful feature.

    Thanks.
    Last edited: Oct 13, 2008
  2. mistwang

    mistwang LiteSpeed Staff

    I think simple multi-lingual content negotiation can be implemented with rewrite rules
  3. Marcus

    Marcus New Member

    Thanks for the reply.

    If you are looking for a single version of a file, then yes, it would be relatively easy to employ using Rewrite rules.

    The problem is when you don't necessarily have the first language of choice of the user, e.g. languages: German, French, English. You might have a site where some of the pages are available in German, some only in French and English and some only with English.

    In Apache, the preferences set in the header are served in order (if specified), or can be set explicitly if no preference is given. This kind of content negotiation is done through this http://httpd.apache.org/docs/1.3/content-negotiation.html - and links from this page.

    I've not looked into it in detail, but I'm not sure it's possible to perform this kind of content negotiation with Rewrite rules. The only path left open to you is a full-blown scripting environment like PHP.

    Obviously for most people this won't be much of an issue, but those (usually companies) with multi-lingual sites (the kind of client that I'm sure you're targeting), this is likely to be something they think about. I'm pretty sure that it would be pretty simple to implement in the server itself, and it would add great value to your product.

    If this is possible with Rewrite rules, could you possibly post an example.

    Thanks.

Share This Page