I work Only with symfony routing components in personal project(without full symfony framwork). my method is: add route in routes.yaml
file like this:
index:
path: /test
methods: GET
controller: 'App\Catalog\Controller\Home\IndexController::index'
register:
path: /test/account/register
methods: GET
controller: 'App\Catalog\Controller\Account\RegisterController::index'
my routing work fine But I need to add automatic locale prefix in uri/routing for multi language system like this:
mydomain/test //for default language ie: en
mydomain/test/fr
mydomain/test/de
mydomain/test/account/register //for default language ie:en
mydomain/test/fr/account/register
mydomain/test/de/account/register
How do add locale prefix in routes.yaml
file and remove default locale prefix language ?!