I need to add another language to a laravel project, I did all the translation files and changed all the text to {{trans()}}
. I just can't change the URIs to seLocale so I wrote this route
Route::get('/changelanguage', function(){
if(Session::has('locale'))
{
$lang = Session::get('locale');
if ($lang == 'en') {
App::setLocale('ar');
session(['locale' => 'ar']);
}
elseif ($lang == 'ar') {
App::setLocale('en');
session(['locale' => 'en']);
}
}else{
session(['locale' => 'en']);
}
return Redirect::back();
});
and this doesn't make any changes to the local