Symfony2 Use default locale in routing (one URL for one language) Symfony2 Use default locale in routing (one URL for one language) symfony symfony

Symfony2 Use default locale in routing (one URL for one language)


Install JMSI18nBundle and apply the strategy prefix_except_default.

The bundle will take care of creating the routes for you.

configuration:

jms_i18n_routing:    default_locale: en    locales: [de, en]    strategy: prefix_except_default

Further information can be found in the bundle's documentation.