I would like to configure Symfony settings localeso that I can successfully access the following routes:
/route
/{locale}/route
Currently I can access /{locale}/route, and I am getting my view, however /routereturns No route found for "GET /route". My configuration is as follows:
parameters:
locale: en
parameters:
app_locales: en|fr
framework:
translator: { fallback: "%locale%" }
default_locale: "%locale%"
app:
resource: '@AppBundle/Controller/'
type: annotation
My controller has the following annotations:
class MyController extends Controller
{
public function listAction()
{
...
}
}
If I specifically turn it on locale, it all works. If I rule out locale, I get an error No route found.
source
share