在使用多语言版本时,遇到了分页没有多语言时怎么处理? 这个需要改动分页PHP文件,文件目录 根目录core>library>think>paginator>driver。 Eyou.php是PC端,Mobile.php是手机端 然后打开Eyou.php修改PC端分页 1,大该在97行 /** * 共N页 N条 * @param string $text * @return string */ protected function getTotalResult() { return sprintf( ''.lang('sys5').'', $this->lastPage, $this->total ); } 2,大该在164行 $pageArr = array(); if (in_array('index', $listitemArr)) { array_push($pageArr, $this->getFirstButton(''.lang('sys1').'')); } if (in_array('pre', $listitemArr)) { array_push($pageArr, $this->getPreviousButton(''.lang('sys2').'')); } if (in_array('pageno', $listitemArr)) { array_push($pageArr, $this->getLinks($listsize)); } if (in_array('next', $listitemArr)) { array_push($pageArr, $this->getNextButton(''.lang('sys3').'')); } if (in_array('end', $listitemArr)) { array_push($pageArr, $this->getLastButton(''.lang('sys4').'')); }
|