Add locale to a route with slug [symfony2]
<p>I'm trying to translate the page of my website, i used the bundle <code>JMSI18nRoutingBundle</code>, but when i'm trying to reach certain pages of the website i have the following error:</p>

<blockquote>
  <p>An exception has been thrown during the rendering of a template
  ("Unable to generate a URL for the named route "page_slug" as such
  route does not exist.") in
  SonataPageBundle:Block:block_container.html.twig at line 15.</p>
</blockquote>

<p>I noticed that i have the error with the pages that have a block of content that is stored in the database.</p>

<p>I'm using <code>SonataPageBundle</code> and <code>SonataBlockBundle</code> to edit certain page of the website.</p>

<p>here Below 2 routes that giving me the error:</p>

<pre><code>privacy_policy:
    path: /privacy_policy
    defaults:  {  _controller: FLYBookingsBundle:Default:privacypolicy }


product:
    pattern: /product/{id}
    defaults: { _controller: FLYBookingsBundle:Post:product }
</code></pre>

<p>.</p>

<pre><code>&lt;li&gt;&lt;a href="{{ path('privacy_policy') }}"&gt;Privacy Policy&lt;/a&gt;&lt;/li&gt;
</code></pre>