第一步:下载DEDE5.5 这个不用说了吧
第二步:安装DEDE5.5这个也不用说了吧
第三步:把安装好的DEDE,templets\default里面的模板复制多一份,命名为英文识别,例如:list_article.htm 复制出来的命名为:list_article_en.htm,发英文版的时候用些列表模板
第四步:可能有些网友出来新建栏目错误,无法保存内容,解决添加顶级栏目错误方法
1. 找到这个文件
\dede\templets\catalog_edit.htm
定位到426行
GetEditor("content",$myrow['content'],"450","Default","print","false");
改成
GetEditor("content",$myrow['content']." ","450","Default","print","false");
2. 如果需要的话再将\dede\templets\catalog_add.htm用上述方法解决,
定位到519行
GetEditor("content","","450","Default","print","false");
改成
GetEditor("content","新建 ","450","Default","print","false");
好看的话就用智能ABC 用V1 把新建改为全角空格
好的,现在基本已经安装好DEDE5.5了
我们直接说中英文翻页问题吧那些什么上一页 下一页 上一篇 下一篇,就在这里开始完全它吧,需要修改到四个文件include\arc.archives.class.php  include\arc.listview.class.php templets\defaultarticle_article_en.htm  templets\defaultlist_article_en.htm 我们直接说英文的方法,中文的自己应该知道改了
先新建个新闻中心栏目吧,新建方法也不多说了 列表模板、文章模板 一定要改为*_en.htm的模板,我喜欢直接建子栏目,建多一个新闻资讯吧,全部建好
不用说,现在创建文章,一定是中文翻页,现在我们就去改代码,加判断,先改列表模板跟文章模板吧,打开列表模板templets\default\list_article_en.htm找到这行
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"  /}
更改为
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5" sitelang="en" /}
中文版的自己去添加然后改成sitrlang="cn"
 这个就完成了,现在就去写判断让它用英文列表模板的会用英文的显示
找开include\arc.listview.class.php找到这行
$list_len = trim($ctag->GetAtt("listsize"));
更改为
$site_lang = trim($ctag->GetAtt("sitelang"));
再往下看,大概481行跟488行把原来的:
    if($ismake==0)
    {
     $this->dtp->Assign($tagid,$this->GetPageListDM($list_len,$listitem));
    }
    else
    {
     $this->dtp->Assign($tagid,$this->GetPageListST($list_len,$listitem));
    }
更改为
    if($ismake==0)
    {
     $this->dtp->Assign($tagid,$this->GetPageListDM($list_len,$listitem, $site_lang ));
    }
    else
    {
     $this->dtp->Assign($tagid,$this->GetPageListST($list_len,$listitem,$site_lang ));
    }
然后再修改GetPageListDM、GetPageListST这两个函数里面判断完就可以了,找到这行,大概在754行
function GetPageListST($list_len,$listitem="index,end,pre,next,pageno")
更改为
function GetPageListST($list_len,$listitem="index,end,pre,next,pageno", $site_lang)
看下去763行$totalpage = ceil($this->TotalResult/$this->PageSize);加车在它下面添加
if($site_lang == 'cn')
 {
 
然后在大概803行//option链接 这个注释上面添加 ,把If完全
这就完成了中文版的判断,添加英文版的,直接在添加}后面添加
 
elseif ($site_lang == 'en')
 { 
  if($totalpage<=1 && $this->TotalResult>0)
  {
   return "<li><span class=\"pageinfo\">TOTALS <strong>1</strong>page<strong>".$this->TotalResult."</strong>records</span></li>\r\n";
  }
  if($this->TotalResult == 0)
  {
   return "<li><span class=\"pageinfo\">TOTALS <strong>0</strong>page<strong>".$this->TotalResult."</strong>records</span></li>\r\n";
  }
  $purl = $this->GetCurUrl();
  $maininfo = "<li><span class=\"pageinfo\">TOTALS <strong>{$totalpage}</strong>page<strong>".$this->TotalResult."</strong>piece</span></li>\r\n";
  $tnamerule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],$this->Fields['defaultname'],$this->Fields['namerule2']);
  $tnamerule = ereg_replace('^(.*)/','',$tnamerule);
  //获得Previous Page和Home page的链接
  if($this->PageNo != 1)
  {
   $prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>Previous</a></li>\r\n";
   $indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>Home</a></li>\r\n";
  }
  else
  {
   $indexpage="<li>Home</li>\r\n";
  }
  //Next Page,End page的链接
  if($this->PageNo!=$totalpage && $totalpage>1)
  {
   $nextpage.="<li><a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>Next</a></li>\r\n";
   $endpage="<li><a href='".str_replace("{page}",$totalpage,$tnamerule)."'>End</a></li>\r\n";
  }
  else
  {
   $endpage="<li>End</li>\r\n";
  }
}   //差不多840行就结束
找到这行,大概在907行,即//获取动态的分页列表下面
function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno")
更改为
function GetPageListDM($list_len,$listitem="index,end,pre,next,pageno", $site_lang)
继续加判断,继续看下去找到$totalpage = ceil($this->TotalResult/$this->PageSize); 回车后加If判断
if($site_lang == 'cn')
  {
然后在大概939行即
  $geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
  $purl .= '?'.$geturl;
上面添加没有完成的判断括号 。继续给英文添加判断直接后面加入
elseif($site_lang == 'en')
 {
  if($totalpage<=1 && $this->TotalResult>0)
  {
   return "<li><span class=\"pageinfo\">TOTALS 1 page/".$this->TotalResult." records</span></li>\r\n";
  }
  if($this->TotalResult == 0)
  {
   return "<li><span class=\"pageinfo\">TOTALS 0 page/".$this->TotalResult." records</span></li>\r\n";
  }
  $maininfo = "<li><span class=\"pageinfo\">TOTALS <strong>{$totalpage}</strong>page<strong>".$this->TotalResult."</strong>piece</span></li>\r\n";
  
  $purl = $this->GetCurUrl();
  if($cfg_rewrite == 'Y')
  {
   $nowurls = ereg_replace("\-", ".php?", $purl);
   $nowurls = explode("?", $nowurls);
   $purl = $nowurls[0];
  }
}
然后在 //获得上一页和下一页的链接 这个注释下面添加If
if($site_lang == 'cn')
 {
到 //获得数字链接 上面结束添加括号 。继续给英文添加判断直接后面加入
elseif($site_lang == 'en')
 {
  if($this->PageNo != 1)
  {
   $prepage.="<li><a href='".$purl."PageNo=$prepagenum'>Previous</a></li>\r\n";
   $indexpage="<li><a href='".$purl."PageNo=1'>Home</a></li>\r\n";
  }
  else
  {
   $indexpage="<li><a>Home</a></li>\r\n";
  }
  if($this->PageNo!=$totalpage && $totalpage>1)
  {
   $nextpage.="<li><a href='".$purl."PageNo=$nextpagenum'>Next</a></li>\r\n";
   $endpage="<li><a href='".$purl."PageNo=$totalpage'>End</a></li>\r\n";
  }
  else
  {
   $endpage="<li><a>End</a></li>\r\n";
  }
}
到这一步,中英文分页已经完成了
现在我们来解决上一篇下一篇的问题吧
打开templets\default\article_article_en.htm 文件,找到47、48行
     <li>{dede:prenext get='pre'/}</li>
     <li>{dede:prenext get='next'/}</li>
更改为
     <li>{dede:prenext get='pre' sitelang='en'/}</li>
     <li>{dede:prenext get='next' sitelang='en'/}</li>

这个就完成了,现在就去写判断让它用英文的文章模板的会用英文的显示
打开 include\arc.archives.class.php 文件,找到
$this->dtp->Assign($i,$this->GetPreNext($ctag->GetAtt('get')));
更改为
$this->dtp->Assign($i,$this->GetPreNext($ctag->GetAtt('get'), $ctag->GetAtt('sitelang')));
然后再找函数 GetPreNext 找到
function GetPreNext($gtype='')
更改为
function GetPreNext($gtype='', $site_lang)
又到写判断代码了
直接在
function GetPreNext($gtype='', $site_lang)
 {
//添加在这里
$str_pre     =  '';
  $str_next    = '';
  $str_pre_words  = '';
  $str_next_words  =  '';
  if($site_lang == 'cn')
  {
   $str_pre     =  '上一篇';
   $str_next    = '下一篇';
   $str_pre_words  = '上一篇:没有了';
   $str_next_words  =  '下一篇:没有了';
  }elseif($site_lang == 'en')
  {
   $str_pre     =  'Preview';
   $str_next    = 'Next';
   $str_pre_words  = 'Preview:no';
   $str_next_words  =  'Next:no';
  }
 
$rs = '';
...........}
然后将 if(is_array($preRow)) 里面的上一篇下一篇 上一篇:没有了,下一篇:没有换成变量,找到
$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";
改为
$this->PreNext['pre'] = $str_pre .":<a href='$mlink'>{$preRow['title']}</a> ";
找到
$this->PreNext['pre'] = "上一篇:没有了 ";
改为
$this->PreNext['pre'] = $str_pre_words;
找到
$this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";
改为
$this->PreNext['next'] = $str_next . ":<a href='$mlink'>{$nextRow['title']}</a> ";
找到
$this->PreNext['next'] = "下一篇:没有了 ";
改为
$this->PreNext['next'] = $str_next_words;
 
到这里,英文上一篇下一篇,也已经完成。
首先说一下代码提供为网友 沉默的公正 提供没有经他同意不写上它的QQ号码了,小弟中英文分页查了几天的资料都没有解决,今天得到他的帮助终于都解决了,再次谢谢 沉默的公正,没有这样写过说明,不知道大家看得清楚不,我会同时附上代码附件,方便参照