Commit 2da47622 authored by shajiaiming's avatar shajiaiming

多语言

parent 5458cbb6
......@@ -31,8 +31,9 @@ class ExploreAppController extends BaseController
];
$name_arr = $params['name'];
$name = [];
foreach ($name_arr as $key => $val) {
$name[$lang[$key]] = $val;
foreach ($lang as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
$params['name'] = $name;
......@@ -101,8 +102,9 @@ class ExploreAppController extends BaseController
];
$name_arr = $params['name'];
$name = [];
foreach ($name_arr as $key => $val) {
$name[$lang[$key]] = $val;
foreach ($lang as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
$params['name'] = $name;
......@@ -197,8 +199,9 @@ class ExploreAppController extends BaseController
];
$name_arr = $params['name'];
$name = [];
foreach ($name_arr as $key => $val) {
$name[$lang[$key]] = $val;
foreach ($lang as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
$params['name'] = $name;
......@@ -247,8 +250,9 @@ class ExploreAppController extends BaseController
];
$name_arr = $params['name'];
$name = [];
foreach ($name_arr as $key => $val) {
$name[$lang[$key]] = $val;
foreach ($lang as $key => $val) {
$name[$val] = isset($name_arr[$val]) ? $name_arr[$val] : '';
}
unset($params['name']);
$params['name'] = $name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment