翻译
This commit is contained in:
@@ -54,6 +54,10 @@ class IndexController
|
||||
|
||||
// 加载语言文件
|
||||
$common_translations = include __DIR__ . "/../lang/{$lang}/common.php";
|
||||
$vehicle_translations = include __DIR__ . "/../lang/{$lang}/vehicle.php";
|
||||
|
||||
// 合并翻译
|
||||
$translations = array_merge($common_translations, $vehicle_translations);
|
||||
|
||||
// 获取菜单并应用翻译
|
||||
$rules = Rule::whereIn('type', [0, 1])->orderBy('weight')->get();
|
||||
@@ -66,7 +70,7 @@ class IndexController
|
||||
|
||||
return view('index/index', [
|
||||
'lang' => $lang,
|
||||
'translations' => $common_translations,
|
||||
'translations' => $translations,
|
||||
'menus' => $menus
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user