I have a i18n project running on Symfony 4.1.
I want to achieve some routing like:
- / => a "Choose language" page route
- /fr/ or /en/ => the homepage route
- /fr/foo/, /en/bar, etc => the other routes
Following this article, I'm using annotations to handle routing and I set a global prefix to my annotations routing :
site:
resource: '../src/Controller/'
type: annotation
prefix:
en: '/en'
fr: '/fr'
This way, all the routes defined in annotations from '../src/Controller/' are prefixed, which leads to a conflict between my "Choose language" page and the homepage.
I want to exclude the "Choose language" page from the i18n prefixing, so I'll be able to use "/" for this page, when the homepage could stay on /fr or /en.
Any ideas to achieve this?