Set site language based on parent site's cookie

Events happening in the community are now at Drupal community events on www.drupal.org.
lightnin's picture

I'm creating a Drupal (6) site that is on a sub-domain of a parent site (made in cake php) that already has functionality for choosing the language in which the site will be displayed. It writes a cookie that indicates this choice. Since my attached drupal site is on a subdomain, it should be possible to read that cookie. I'd like to configure Drupal to always display pages in this language, if available, and in the default language (English) if not.

I'm told this should be possible. Can anyone recommend how best to go about doing this? I'm rather new to Drupal and PHP.