diff --git a/plugin/admin/app/controller/LogisticsShipController.php b/plugin/admin/app/controller/LogisticsShipController.php index 7ee3406..710ac07 100644 --- a/plugin/admin/app/controller/LogisticsShipController.php +++ b/plugin/admin/app/controller/LogisticsShipController.php @@ -62,10 +62,17 @@ class LogisticsShipController extends Crud */ public function insert(Request $request): Response { + $lang = session('lang', 'zh-cn'); + $translations = (array)require __DIR__ . '/../lang/' . $lang . '/ship.php'; + $common = (array)require __DIR__ . '/../lang/' . $lang . '/common.php'; + $translations = array_merge($translations, $common); if ($request->method() === 'POST') { return parent::insert($request); } - return view('logistics-ship/insert'); + return view('logistics-ship/insert', [ + 'lang' => $lang, + 'translations' => $translations + ]); } /**