織夢(mèng)DEDE列表分頁(yè)如何轉(zhuǎn)換英文
找include/arc.listview.class.php進(jìn)行修改
先說(shuō)一下調(diào)用方法:
調(diào)用方法:
{dede:pagelist listsize='5'/}
{dede:pagelist pagelang='en' listsize='5'/}
pagelang:en為英文,否則為中文,默認(rèn)語(yǔ)言中文
修改arc.listview.class.php文件如下:
/**
* 獲取靜態(tài)的分頁(yè)列表
*
* @access public
* @param string $list_len 列表寬度
* @param string $list_len 列表樣式
* @return string
*/
function GetPageListST($list_len,$listitem="index,end,pre,next,pageno")
{
if($pagelang='en'){
$uahome=" Home ";
$uaprevious=" Previous ";
$uanext=" Next ";
$ualastpage=" Last Page ";
$uapage=" Page ";
$uatotal=" Total ";
$uarecords=" Records. ";
$uaarticle=" Article ";
}else{
$uahome="首頁(yè)";
$uaprevious="上一頁(yè)";
$uanext="下一頁(yè)";
$ualastpage="末頁(yè)";
$uapage="頁(yè)";
$uatotal="共";
$uarecords="條記錄";
$uaarticle="條";
}
$prepage = $nextpage = '';
$prepagenum = $this->PageNo-1;
$nextpagenum = $this->PageNo+1;
if($list_len=='' || preg_match("/[^0-9]/", $list_len))
{
$list_len=3;
}
$totalpage = ceil($this->TotalResult/$this->PageSize);
if($totalpage<=1 && $this->TotalResult>0)
{
return "<li><span class=\"pageinfo\">$uatotal <strong>1</strong>$uapage<strong>".$this->TotalResult."</strong>$uarecords</span></li>\r\n";
}
if($this->TotalResult == 0)
{
return "<li><span class=\"pageinfo\">$uatotal <strong>0</strong>$uapage<strong>".$this->TotalResult."</strong>$uarecords</span></li>\r\n";
}
$purl = $this->GetCurUrl();
$maininfo = "<li><span class=\"pageinfo\">$uatotal <strong>{$totalpage}</strong>$uapage<strong>".$this->TotalResult."</strong>$uaarticle</span></li>\r\n";
$tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']);
$tnamerule = preg_replace("/^(.*)\//", '', $tnamerule);
//獲得上一頁(yè)和主頁(yè)的鏈接
if($this->PageNo != 1)
{
$prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>$uaprevious</a></li>\r\n";
$indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>$uahome</a></li>\r\n";
}
else
{
$indexpage="<li>$uahome</li>\r\n";
}
//下一頁(yè),未頁(yè)的鏈接
if($this->PageNo!=$totalpage && $totalpage>1)
{
$nextpage.="<li><a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>$uanext</a></li>\r\n";
$endpage="<li><a href='".str_replace("{page}",$totalpage,$tnamerule)."'>$ualastpage</a></li>\r\n";
}
else
{
$endpage="<li>$ualastpage</li>\r\n";
}
調(diào)用效果如圖:

以上就是關(guān)于【織夢(mèng)DEDE列表分頁(yè)如何轉(zhuǎn)換英文】的文章內(nèi)容,如果您還想了解更多關(guān)于網(wǎng)站建設(shè)與網(wǎng)絡(luò)推廣的相關(guān)文章,請(qǐng)繼續(xù)查看【織夢(mèng)教程】欄目的其它文章
來(lái)源www.theround.com.cn廣州明行威,致力于中小企業(yè)網(wǎng)絡(luò)營(yíng)銷推廣、整體外包運(yùn)營(yíng)(網(wǎng)站建設(shè)、SEM、SEO等)、企業(yè)SEO內(nèi)訓(xùn)、信息流廣告運(yùn)營(yíng)
歡迎交流 加微信13430336474 廣州張楷

上一篇:織夢(mèng)用channel時(shí)noself='yes'無(wú)子欄目時(shí)不調(diào)用頂級(jí)欄目的解決方法 下一篇:織夢(mèng)網(wǎng)站后臺(tái)增加復(fù)制文章文檔到其他欄目的功能