3) that's the magic I'm looking for. I know it can be done as I have a French browser & when I go to the Microsoft site, all the text canges from English to French.

Your browser is probably sending "fr" as the value of the accept-language http request header. It may be sending something like "fr, en" if you have it set to accept French and English with French as the default. This can get trickier when you consider American and US English etc., but your requirement seems to be simply show the French version if French language is acceptable to the client and French is preferable to English, otherwise show the English version.


You need something like...

frenchFound = REFind("fr[#chr(32)#,\-]{1}",cgi.http_accept_language);
if ( frenchFound ) {
  englishFound = REFind("en[#chr(32)#,\-]{1}",cgi.http_accept_language);
  if ( englishFound and englishFound lt frenchFound ) {
      ENGLISH VERSION - both languages found, but english before french
    } else {
      FRENCH VERSION
    }
} else {
  ENGLISH VERSION
}

More information is available in the RFC, www.freesoft.org has them html formatted which is nice.

Hope this clarifies things a bit, i haven't tested the code btw


Mark



-- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
     *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
          *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]



Reply via email to