Skip to content

Instantly share code, notes, and snippets.

@morontt
Created September 1, 2014 14:13
Show Gist options
  • Select an option

  • Save morontt/ea44684e91181c674160 to your computer and use it in GitHub Desktop.

Select an option

Save morontt/ea44684e91181c674160 to your computer and use it in GitHub Desktop.
i18n routing
#app/config/routing.yml
frontend_de:
resource: "@FrontendBundle/Resources/config/routing_de.yml"
host: %domain_de%
defaults: { _locale: de }
requirements:
_locale: de
prefix: /
frontend_en:
resource: "@FrontendBundle/Resources/config/routing_en.yml"
host: %domain_en%
defaults: { _locale: en }
requirements:
_locale: en
prefix: /
frontend_privacy_de:
path: /privacy-de
defaults:
_controller: FrameworkBundle:Template:template
template: 'FrontendBundle:Static:privacy_de.html.twig'
frontend_privacy_en:
path: /privacy-en
defaults:
_controller: FrameworkBundle:Template:template
template: 'FrontendBundle:Static:privacy_en.html.twig'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment