cvs: phpweb /include langchooser.inc
| From: | Gabor Hojtsy | Date: | Thu, 13 Mar 2003 17:14:03 +0000 |
| Subject: | cvs: phpweb /include langchooser.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-16322@lists.php.net to get a copy of this message | ||
goba Thu Mar 13 12:14:03 2003 EDT
Modified files:
/phpweb/include langchooser.inc
Log:
Really honor the user's language settings...
Index: phpweb/include/langchooser.inc
diff -u phpweb/include/langchooser.inc:1.14 phpweb/include/langchooser.inc:1.15
--- phpweb/include/langchooser.inc:1.14 Thu Mar 13 12:06:25 2003
+++ phpweb/include/langchooser.inc Thu Mar 13 12:14:02 2003
@@ -1,6 +1,6 @@
<?php // -*- C++ -*-
-// $Id: langchooser.inc,v 1.14 2003/03/13 17:06:25 goba Exp $
+// $Id: langchooser.inc,v 1.15 2003/03/13 17:14:02 goba Exp $
/*
@@ -42,7 +42,7 @@
function language_choose_code()
{
- global $_REQUEST, $_SERVER;
+ global $_REQUEST, $_SERVER, $COOKIE;
// Contains all the languages picked up by the
// process in priority order (without repeating codes)
@@ -79,7 +79,10 @@
}
}
- // MYPHPNET handling should be added here
+ // Honor the users own language setting (if available)
+ if (isset($_COOKIE['MYPHPNET'])) {
+ language_add($_COOKIE['MYPHPNET'], $languages);
+ }
// Specified by the user via the browser's Accept Language setting
// Samples: "hu, en-us;q=0.66, en;q=0.33", "hu,en-us;q=0.5"