Wind Letter Net (ithov.com) original article: Recently, in testing a website function, found below the search results for Chinese "a total of 0 pages/0 records", but the customer's website for the English version, so we need to search the results of the information should also be displayed as English, OK, We started to modify the Dedecms file to achieve the results we need!
"Total 0 page/0 record" We need to modify the include/datalistcp.class.php file, but please note that many other pages will be displayed in English after the file has been modified.
Locate the file on line 30th:
$lang _pre_page = ' prev ';
$lang _next_page = ' next page ';
$lang _index_page = ' home ';
$lang _end_page = ' last ';
$lang _record_number = ' record ';
$lang _page = ' page ';
$lang _total = ' total ';
Modified to:
$lang _pre_page = ' Previous ';
$lang _next_page = ' Next ';
$lang _index_page = ' home ';
$lang _end_page = ' End ';
$lang _record_number = ' Records ';
$lang _page = ' page ';
$lang _total = ' total ';
After saving, we test the search results! Successfully achieved the results we need.
modifying include/arc.searchview.class.php files
Locate the file on line No. 820:
if ($totalpage <=1 && $this->totalresult>0)
{
Return "A total of 1 pages/". $this->totalresult. " Record ";
}
if ($this->totalresult = = 0)
{
Return "A total of 0 pages/". $this->totalresult. " Record ";
}
Modified to:
if ($totalpage <=1 && $this->totalresult>0)
{
Return "Total 1 page/". $this->totalresult. " Records ";
}
if ($this->totalresult = = 0)
{
Return "Total 0 page/". $this->totalresult. " Records ";
}
Locate the file on line No. 837:
$infos = "<td> find <b>" $this->totalresult. " </b> record/maximum display <b>{$totalpage}</b> page </td>\r\n ";
Modified to:
$infos = "<td>Total<b>" $this->totalresult. " </b>records/max. display<b>{$totalpage}</b>page </td>\r\n ";
Locate the file on line No. 852:
if ($this->pageno!= 1)
{
$prepage. = "<td width= ' ><a href= '". $purl. " pageno= $prepagenum ' > Prev </a></td>\r\n ';
$indexpage = "<td width= ' ><a href= '". $purl. " Pageno=1 ' > Home </a></td>\r\n ';
}
Else
{
$indexpage = "<td width= ' > Home </td>\r\n";
}
if ($this->pageno!= $totalpage && $totalpage >1)
{
$nextpage. = "<td width= ' ><a href= '". $purl. " pageno= $nextpagenum ' > next page </a></td>\r\n ';
$endpage = "<td width= ' ><a href= '". $purl. " pageno= $totalpage ' > Last </a></td>\r\n ';
}
Else
{
$endpage = "<td width= ' > Last </td>\r\n";
}
Modified to:
if ($this->pageno!= 1)
{
$prepage. = "<td width= ' ><a href= '". $purl. " pageno= $prepagenum ' >previous</a></td>\r\n ';
$indexpage = "<td width= ' ><a href= '". $purl. " Pageno=1 ' >home</a></td>\r\n ';
}
Else
{
$indexpage = "<td width= ' >home</td>\r\n";
}
if ($this->pageno!= $totalpage && $totalpage >1)
{
$nextpage. = "<td width= ' ><a href= '". $purl. " pageno= $nextpagenum ' >next</a></td>\r\n ';
$endpage = "<td width= ' ><a href= '". $purl. " pageno= $totalpage ' >end</a></td>\r\n ';
}
Else
{
$endpage = "<td width= ' >end</td>\r\n";
}
modifying include/arc.archives.class.php files
Locate the file on line No. 873:
$PageList = "<li><a> altogether". $totalPage. " Page: </a></li>;
$nPage = $nowPage-1;
$lPage = $nowPage +1;
if ($nowPage ==1)
{
$PageList. = "<li><a href= ' > Prev </a></li>";
......
Modified to:
$PageList = "<li><a>total". $totalPage. " Page: </a></li>;
$nPage = $nowPage-1;
$lPage = $nowPage +1;
if ($nowPage ==1)
{
$PageList. = "<li><a href= ' >Previous</a></li>";
......
Locate the file on line No. 966:
$PageList = "<li><a> altogether". $totalPage. " Page: </a></li>;
$nPage = $nowPage-1;
$lPage = $nowPage +1;
if ($nowPage ==1)
{
$PageList. = "<li><a href= ' > Prev </a></li>";
}
Modified to:
$PageList = "<li><a>total". $totalPage. " Page: </a></li>;
$nPage = $nowPage-1;
$lPage = $nowPage +1;
if ($nowPage ==1)
{
$PageList. = "<li><a href= ' >Previous</a></li>";
}
Note that the Chinese in the document can be changed to the corresponding English.