美文网首页
eyoucms 多语言版本的分页变量修改

eyoucms 多语言版本的分页变量修改

作者: 西祠_fa33 | 来源:发表于2019-03-16 08:55 被阅读0次

    在使用多语言版本时,遇到了分页没有多语言时怎么处理?

    这个需要改动分页PHP文件,文件目录 根目录corelibrary hinkpaginatordriver。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').''));

                }

    修改完成后前端就会显示多语言分页了。手机端也是同理修改

    转自:https://www.eyoucms.com/help/eyoujq/5661.html

    相关文章

      网友评论

          本文标题:eyoucms 多语言版本的分页变量修改

          本文链接:https://www.haomeiwen.com/subject/ytdjmqtx.html