http://www.xqf01.com/cms/dedecms/24.html
一文提到怎么做dedecms织梦英文(多语言版本),此文来讲讲dedecms织梦做英文(多语言)站分页标签、当前位置怎么设置英文。
1:列表分页英文设置教程
用arc.listview.class.php覆盖include/arc.listview.class.php
调用方法: {dede:pagelist listsize='5'/}{dede:pagelist pagelang='en' listsize='5'/}
pagelang:en为英文,cn为中文,默认语言中文扩展阅读:
/** * 获取静态的分页列表 * * @access public * @param string $list_len 列表宽度 * @param string $list_len 列表样式 * @return string */ function GetPageListST($list_len,$listitem="index,end,pre,next,pageno",$pagelang) { /*****************************************************************************************/ if($pagelang='cn'){ $uahome="首页"; $uaprevious="上一页"; $uanext="下一页"; $ualastpage="末页"; $uapage="页"; $uatotal="共"; $uarecords="条记录"; }else{ $uahome=" Home "; $uaprevious=" Previous "; $uanext=" Next "; $ualastpage=" Last Page "; $uapage=" Page "; $uatotal=" Total "; $uarecords=" Records. "; }$prepage = $nextpage = ''; $prepagenum = $this->PageNo-1; $nextpagenum = $this->PageNo+1; if($list_len=='' || ereg("[^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"; } ".$uarecords."</span></li>\r\n"; $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields ['namerule2']); //获得上一页和主页的链接 //下一页,未页的链接 //option链接 $optionlen = strlen($totalpage); //获得数字链接 return $plist; |
2:{dede:field name='position'}中英文双语
替换前面的“首页”两成“Home”就行了,后台的栏目用英文就行
标签:{dede:field name='position' function='str_replace("首页","Home",Html2Text("@me"))'/}