setLocale($locale); // //Gets the translated message and displays it // echo trans('lang.msg'); // } public function index() { return view('localization.index'); } public function setLocale($lang) { //if action is post method: //$lang = Input::get('language'); //Session::put('locale', $lang); Session::put(['locale' => $lang]); // Session::save(); //return redirect(url(URL::previous())); return Redirect::back(); // echo trans('document.msg'); } }