Reputation: 977
I am trying to implement localization in my laravel 4 app, its straightforward:
I submit locale to the method:
class LanguageController extends \BaseController
{
public function chooser(){
Session::set('locale',Input::get('locale'));
return Redirect::back();
}
}
but, I keep getting session value un-changed, any idea? Is there a recommended laravel package to handle sessions?
Upvotes: 1
Views: 86
Reputation: 85
Just use
App::setLocale(Input::get('locale'));
You can then get the locale using App::getLocale()
http://laravel.com/docs/4.2/localization
Upvotes: 1