Bug #14985 Updated: Language when searching on mirrors
| From: | sander@php.net | Date: | Sun, 16 Jun 2002 20:09:48 +0000 |
| Subject: | Bug #14985 Updated: Language when searching on mirrors | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-10863@lists.php.net to get a copy of this message | ||
ID: 14985
Updated by: sander@php.net
Reported By: msopacua@idg.nl
-Status: Open
+Status: Closed
Bug Type: Website problem
Operating System: Not relevant
PHP Version: 4.1.1
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-01-10 19:04:45] msopacua@idg.nl
The following has been discussed with Gorba, but he didn't have the
time to look into it and requested I reported it here.
Basically - manual-lookup.php already is prepared for a language.
Search.php however, doesn't know about it.
The following unified diff, shows a basic implementation of how it can
be supported.
Without this, even if you read the english manual, the search box, will
direct you to the manual, in the default language for the mirror you're
visiting. This may not be what you want.
--- ./search.php.dist Wed Jan 9 20:19:14 2002
+++ ./search.php Fri Jan 11 00:58:26 2002
@@ -13,11 +13,19 @@
if (isset($prevsearch) && get_magic_quotes_gpc())
$prevsearch = stripslashes($prevsearch);
+if (isset($lang) && get_magic_quotes_gpc())
+{
+ $lang = stripslashes($lang);
+}
+else
+{
+ $lang = ereg_replace("^([a-z]{2}).*$", "\\1".
$HTTP_ACCEPT_LANGUAGE);
+}
if ($pattern) {
setcookie("prevsearch",$pattern,0,"",".php.net");
if ($show=="quickref") {
- header("Location:
manual-lookup.php?pattern=".urlencode($pattern));
+ header("Location:
manual-lookup.php?pattern=".urlencode($pattern)."&lang=".urlencode($lang));
exit;
}
$location = "http://www.progressive-comp.com/Lists/";
@@ -59,7 +67,7 @@
header("Location: ".$location."?".$query);
exit;
}
-}
+}
if (file_exists("configuration.inc")) {
include_once 'configuration.inc';
@@ -101,6 +109,7 @@
?>
<h1>Search</h1>
<form action="<?php echo $form;?>" method="post">
+<input type="hidden" name="lang" value="<?php echo
htmlspecialchars($lang); ?>">
<table cellspacing="0" cellpadding="2" border="0"
align="center">
<tr valign="top">
<td align="right">
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=14985&edit=1