Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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')));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment