有没有一种简单的方法可以在Laravel 5.4中翻译我的路线。坐落在这里我的翻译文件:Laravel 5.4:翻译路线
/resources
/lang
/en
routes.php
/de
routes.php
在我web.php我这样定义我的路线:
Route::get('/{locale}', function ($locale) {
App::setLocale($locale);
return view('welcome');
});
Route::get('{locale}/contact', '[email protected]');
我发现非常复杂的解决方案或解决方案,为Laravel 4.我相信Laravel也提供了一个简单的解决方案。有人能向我解释最好的方法吗?
谢谢。
试试这个https://laracasts.com/discuss/channels/tips/example-on-how-to-use-multiple-locales-in-your-laravel-5-website –
我会测试它 - 谢谢。 – Sascha