2

I'm starting a sulu.io project and I want urls like that (French is the default language) :

{host}/mon-article
{host}/en/my-article

My config:

<localizations>
    <localization language="fr" default="true"/>
    <localization language="en"/>
</localizations>

I've tried :

<environment type="dev">
     <urls>
          <url language="fr">{host}</url>
          <url>{host}/{localization}</url>
     </urls>
</environment>

But it redirect everything with {host}/fr, I can't have {host} only

Tib
  • 2,553
  • 1
  • 27
  • 46

2 Answers2

0

Try to use bundle JMSI18nRoutingBundle, hear the tutorial how to configured hem (6 minutes).

jms_i18n_routing:
    default_locale: "%locale%"
    locales: [ru, ua]
    strategy: prefix_except_default (!!!)
0

Try next:

<environment type="dev">
     <urls>
          <url language="fr">{host}</url>
          <url language="en">{host}/en</url>
     </urls>
</environment>

It works for sulu 1.6.21