How do you do this? But if possible, avoid it for a particular language
Writing it down for every URL is annoying ..
For example: I want my site to respond to / and / fr-FR / for each URL. First for English, last for French.
You should take a look at the JMSI18nRoutingBundle , add support for internationalizing routes without duplicating the definition of routing.
This kit comes with three scenarios for recounting routes. Your example is perfect for scenario 2 , which is "Prefixing All Routes With The Locale except those of the default locale"
"Prefixing All Routes With The Locale except those of the default locale"
In your routing.yml you might have something like (if you use yaml to configure routing:
AcmeTestBundle: resource: "@AcmeTestBundle/Resources/config/routing.yml" prefix: /
Have you tried adding {locale} to the prefix?
Source: https://habr.com/ru/post/1381549/More articles:how to set your own mime file type - androidWhere does SWT write DLL files on Windows? - javaHow to set text above and below the JButton icon? - javaSharing colors between SASS files and Rails erb templates - ruby-on-railsHow to program my own arrays and lists - javaGet the maximum value for time_t with Visual Studio - c ++ODBC password protection in SAS - securityHow to avoid the need to create a temporary file to run two commands from the bash shell? - command-linelanguage definition - c ++Linear regression in R with a variable number of explanatory variables - rAll Articles