Answer the question
In order to leave comments, you need to log in
Laravel route group prefix change to postfix?
Route::group(['prefix' => '?cc=' . LaravelLocalization::setLocale()], function()
{
Route::get('test',function(){
return View::make('test');
});
});
// вернет http://site/?cc=ru/test/
Route::get('test/{locale}',function($locale){
App::setLocale($locale);
return View::make('test');
});
//вернет http://site/test/ru
Answer the question
In order to leave comments, you need to log in
No.
Try to save the selected language in cookies and that's it. And then check the language cookies in the controller constructor.
There will be a lot of confusion in the future if you do everything like this :) + And if another language is added.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question