diff --git a/app/index/lang/en-us.php b/app/index/lang/en-us.php index 70edf02..fd27a80 100644 --- a/app/index/lang/en-us.php +++ b/app/index/lang/en-us.php @@ -2,33 +2,60 @@ return [ //menu - 'index' => 'index', - 'home_page' => 'home page', - 'user_center' => 'center', - 'set_info' => 'set info', - 'my_message' => 'message', - 'my_page' => 'my page', + 'index' => 'Index', + 'home page' => 'Home page', + 'user center' => 'Center', + 'set info' => 'Set info', + 'my message' => 'Message', + 'my page' => 'My page', - 'login' => 'login', - 'logout' => 'logout', - 'register' => 'register', - 'discuss' => 'discuss', - 'case' => 'case', - 'timeline' => 'timeline', + 'login' => 'Login', + 'logout' => 'Logout', + 'register' => 'Register', + 'discuss' => 'Discuss', + 'case' => 'Case', + 'timeline' => 'Timeline', //帖子 - 'add_post' => 'add post', - 'my_collection' => 'my collection', - 'all' => 'all', - 'over' => 'over', - 'hot' => 'hot', - 'top' => 'top', - 'go_sign' => 'go sign', - 'more_post' => 'more post', - 'friendly_link' => 'friendly link', + 'title color' => 'Title color', + 'add_post' => 'Add post', + 'my collection' => 'My collection', + 'cancel collection' => 'cancel collection', + 'all' => 'All', + 'finished' => 'Finished', + 'no finished' => 'no finished', + 'hot' => 'Hot', + 'top' => 'Top', + 'cancel hoting' => 'Cancel hoting', + 'cancel topping' => 'Cancel topping', + 'go sign' => 'Go sign', + 'more post' => 'more post', + 'friendly link' => 'Friendly link', + 'reviewers list' => 'Reviewers list', + 'hot post list' => 'Hot post list', + 'links list' => 'Links list', + 'Sign in' => 'Sign in', + 'statement' => 'Statement', + 'trends' => 'Trends', + 'sponsor' => 'Sponsor sponsor', + 'i want to join' => 'i want to join', + 'official products' => 'Official products', + 'no comments' => 'No comments', + 'submit comments' => 'Submit comments', + 'reply' => 'reply', + 'accept' => 'accept', + 'please input the content' => 'please input the content', + 'ads area' => 'Ads area', + 'enclosure' => 'enclosure', + 'download files' => 'Download files', + + //message + 'add' => 'add', + 'delete' => 'delete', + 'edit' => 'edit', 'add success' => 'add success!', 'add error' => 'add error', 'edit success' => 'articel edit success', diff --git a/app/index/lang/zh-cn.php b/app/index/lang/zh-cn.php index 223ee36..885ad0c 100644 --- a/app/index/lang/zh-cn.php +++ b/app/index/lang/zh-cn.php @@ -3,11 +3,11 @@ return [ //menu 'index' => 'index', - 'home_page' => '首页', - 'user_center' => '用户中心', - 'set_info' => '设置', - 'my_message' => '我的消息', - 'my_page' => '我的主页', + 'home page' => '首页', + 'user center' => '用户中心', + 'set info' => '设置', + 'my message' => '我的消息', + 'my page' => '我的主页', 'login' => '登录', 'logout' => '退出', @@ -17,21 +17,41 @@ return [ 'timeline' => '框架日志', //帖子 + 'title color' => '颜色', 'add_post' => '添加帖子', - 'my_collection' => '我的收藏', + 'my collection' => '我的收藏', + 'cancel collection' => '取消收藏', 'all' => '综合', - 'over' => '已结', + 'finished' => '已结', + 'no finished' => '未结', 'hot' => '热贴', 'top' => '精贴', - 'go_sign' => '去签到', - 'more_post' => '更多帖子', - 'friendly_link' => '友情链接', - - + 'cancel hoting' => '取消精贴', + 'cancel topping' => '取消置顶', + 'go sign' => '去签到', + 'more post' => '更多帖子', + 'friendly link' => '友情链接', + 'reviewers list' => '回帖热榜', + 'hot post list' => '本周热议', + 'links list' => '温馨通道', + 'Sign in' => '签到', + 'statement' => '说明', + 'trends' => '动态', + 'sponsor' => '钻级赞助商', + 'i want to join' => '我要加入', + 'official products' => '官方产品', + 'no comments' => '暂时还没有评论', + 'submit comments' => '提交评论', + 'reply' => '回复', + 'accept' => '采纳', + 'please input the content' => '请输入内容', + 'ads area' => '广告区', + 'enclosure' => '附件', + 'download files' => '下载文件', - 'hello thinkphp' => '欢迎使用ThinkPHP', - 'data type error' => '数据类型错误', + 'add' => '添加', + 'delete' => '删除', 'add success' => '添加成功!', 'add error' => '添加失败', 'edit success' => '修改成功', diff --git a/app/index/middleware.php b/app/index/middleware.php index 2918e68..10b6a9b 100644 --- a/app/index/middleware.php +++ b/app/index/middleware.php @@ -4,6 +4,8 @@ return [ \app\middleware\LoginCookie::class, \app\middleware\Install::class, \app\middleware\Browse::class, + // 多语言加载 + \think\middleware\LoadLangPack::class, //app\middleware\LoginCheck::class, //app\middleware\CheckRegister::class, //'logedcheck' => \app\middleware\logedCheck::class, diff --git a/public/static/res/mods/index.js b/public/static/res/mods/index.js index 56d45b8..197a6e7 100644 --- a/public/static/res/mods/index.js +++ b/public/static/res/mods/index.js @@ -850,12 +850,23 @@ layui.define(['layer', 'laytpl', 'form', 'element', 'upload', 'util'], function( } }); }); + + + //监听语音选择提交 + form.on('select(language)', function(data){ + var data = data.value; + $.post(langUrl,{language:data},function(result){ + location.reload(); + }); + return false; + }); //固定Bar util.fixbar({ bar1: '' ,bgcolor: '#009688' ,click: function(type){ + //添加文章 if(type === 'bar1'){ //slayer.msg('打开 index.js,开启发表新帖的路径'); location.href = articleAdd; diff --git a/view/taoler/index/article/cate.html b/view/taoler/index/article/cate.html index 7095ba1..1587283 100644 --- a/view/taoler/index/article/cate.html +++ b/view/taoler/index/article/cate.html @@ -35,14 +35,14 @@ {$art.create_time|date='Y-m-d'} - {if ($art.jie == 1)} {/if} + {if ($art.jie == 1)} {/if} {$art.comments_count}