title: Redirect route to language prefix in Symfony 4
body: <p>Since version 4.1, Symfony now handles multilingual routing without the need of an external plugin (<a href="https://symfony.com/blog/new-in-symfony-4-1-internationalized-routing" rel="nofollow noreferrer">https://symfony.com/blog/new-in-symfony-4-1-internationalized-routing</a>). I've translated my routes with success and all works fine except that when accessing the root url ("/"), Symfony renders a 404 error instead of redirecting to a language folder such as "/en/".</p>
  
  <p>I've done some research but most of what i've found is very outdated (mostly Symfony 2). Also ran into this <a href="https://stackoverflow.com/questions/34711082/symfony-3-redirect-all-routes-to-current-locale-version">Symfony 3 Redirect All Routes To Current Locale Version</a> but it seems like an incredibly tedious solution to such a simple problem.</p>
  
  <p>Ideally, i'd also like to redirect the url "/admin" to "/en/admin", but if i can't achieve it i can live with that.</p>
  
  <p>Here's my routes/annotations.yaml file:</p>
  
  <pre><code>controllers:
      resource: ../../src/Controller/
      type: annotation
      prefix:
          fr: '/fr'
          en: '/en'
          de: '/de'
  </code></pre>
  
  <p>My translations .yaml file:</p>
  
  <pre><code>framework:
  #default_locale: '%locale%'
  default_locale: 'en'
  translator:
      paths:
          - '%kernel.project_dir%/translations'
      fallbacks:
          - 'en'
  </code></pre>
  
  <p>Home route configuration:</p>
  
  <pre><code>@Route("/", name="home")
  </code></pre>