This commit is contained in:
2025-05-06 20:21:09 +08:00
parent 106ad4d943
commit 1e9703cf93
9 changed files with 196 additions and 123 deletions
@@ -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
]);
}