Jeremy Newman : add some debug messages about language detection

Jeremy Newman jnewman at winehq.org
Thu Dec 11 10:25:24 CST 2008


Module: website
Branch: master
Commit: 20075e4820d30b1832a2ba589c98177a6dcc11fd
URL:    http://source.winehq.org/git/website.git/?a=commit;h=20075e4820d30b1832a2ba589c98177a6dcc11fd

Author: Jeremy Newman <jnewman at codeweavers.com>
Date:   Thu Dec 11 10:23:18 2008 -0600

add some debug messages about language detection

---

 include/html.php |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/html.php b/include/html.php
index f56348f..27c2162 100644
--- a/include/html.php
+++ b/include/html.php
@@ -246,6 +246,7 @@ class html
         if (isset($_COOKIE['lang']) and in_array($_COOKIE['lang'], $GLOBALS['config']->languages))
         {
             // load language from URL or cookie
+            debug("global", "lang from cookie: {$_COOKIE['lang']}");
             $lang = $_COOKIE['lang'];
         }
         else if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]))
@@ -259,7 +260,10 @@ class html
                     $avail[0] = substr($avail[0], 0, 2);
                 // check to make sure lang is defined in our config
                 if (in_array($avail[0], $GLOBALS['config']->languages))
+                {
+                    debug("global", "lang from browser: {$avail[0]}");
                     $lang = $avail[0];
+                }
             }
             unset($avail);
         }




More information about the wine-cvs mailing list