W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > January to March 2004

Re: [WAI-IG] Serving my page in the right language

From: ATutor <info@atutor.ca>
Date: Sun, 21 Mar 2004 13:06:23 -0500
Message-ID: <405DD99F.8020009@atutor.ca>
To: w3c-wai-ig@w3.org
Cc: Paul Davis <paul@ten-20.com>, David Dorward <david@us-lot.org>

I little guidance in ATutor language negotiation might help:

If you are reviewing the code, most of the language negotiation is done 
in include/lib/select_lang.inc.php. The output from this script is 
stored in a session variable which is displayed through a small block of 
code in the various header files found throughout ATutor.

Assuming a user is accessing ATutor for the first time, or is not yet 
logged in, the script attempts to determine what the user's preferred 
language is by detecting it in the  HTTP_ACCEPT_LANGUAGE environment 
variable (the browser's setting), and if a translation is available, 
that language is displayed. Otherwise ATutor retreives a user's language 
preference from their profile settings, or if that fails it's retreived 
from the default language setting set for the system's by the system 
administrator. If all fail then English is displayed.

Hope this helps...

greg 

ATutor wrote:

>
>
> Paul Davis wrote:
>
>> ...It is always easy and safer to seek the
>> negative angle. I feel it may be time for your's and others' 
>> expertise to be
>> used, not just discussed. That way, may be something could be 
>> achieved, not
>> matter how small. The longest journey starts with a small step. Dare 
>> you to
>> take it.
>>
>>
>>  
>>
> Before a scrap breaks out, see how language negotiation is dealt with 
> in ATutor. Try the demo or download and install a copy if you want to 
> review the code... (atutor.ca also negotiates language when using the 
> translator site)
>
> ATutor Demo
> http://www.atutor.ca/atutor/demo.php
>
> ATutor Download
> http://www.atutor.ca/atutor/download.php
>
> Be gentle *smile* We're workin' on it.
>
> greg
>
>
Received on Sunday, 21 March 2004 13:06:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:13:32 UTC