PHP Silex routing localization
问题 starting with Silex. Say I want a localised site where all routes have to start with /{_locale} and don't fancy repeating myself as : $app->match('/{_locale}/foo', function() use ($app) { return $app['twig']->render('foo.twig'); }) ->assert('_locale', implode('|', $app['languages.available'])) ->value('_locale', $app['locale.default']) ->bind('foo'); $app->match('/{_locale}/bar', function() use ($app) { return $app['twig']->render('bar.twig'); }) ->assert('_locale', implode('|', $app[