Symfony 4.4 Add current locale to generateURL function

I have route configuration like this

 resource: '../src/Controller/'
 type: annotation
  en: '' 
  '*': '/{_locale}'

this works very good, attribute override locale

but when i use generateURL i must always add code to get current locale and set it

how to do it automatically?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *