Skip to content

Instantly share code, notes, and snippets.

@NightZpy
Created November 7, 2014 21:10
Show Gist options
  • Save NightZpy/eef587eb0b21b76f848f to your computer and use it in GitHub Desktop.
Save NightZpy/eef587eb0b21b76f848f to your computer and use it in GitHub Desktop.
Translaste routes laravel
Route::group(
array(
'prefix' => LaravelLocalization::setLocale(),
'before' => 'LaravelLocalizationRoutes' // Route translate filter
),
function()
{
/** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
Route::get('/', function()
{
// This routes is useless to translate
return View::make('hello');
});
Route::get(LaravelLocalization::transRoute('routes.about'),function(){
return View::make('about');
});
Route::get(LaravelLocalization::transRoute('routes.view'),function($id){
return View::make('view',array('id'=>$id));
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment