fredyounan
2/11/2014 - 5:38 AM

multiLanguageL4.php

<?php

// http://stackoverflow.com/questions/16559421/t-can-not-switch-language-in-laravel4?utm_source=laravel

// app/routes.php
Route::get('lang/{lang}', function($lang)
{
    Session::put('my.locale', $lang);
    return Redirect::to('/');
});

// app/start/global.php
App::setLocale(Session::get('my.locale', Config::get('app.locale')));