0

I want to create a multilanguage site in contao. What I did so far:

At first I copied the Page tree of current language. At second I added domains like example.com/de and example.com/en in site-structure "Domain name" of both root pages.

Edit: Finally I added app/config/config.yml

contao:
    prepend_locale: true

For my assumption it should work now but it doesnt. What else is necessary to make it work.

toruwe
  • 35
  • 7
  • I got no clue about `php`, but I suppose you lack **code**. How do you suppose people help you if you don't share the code describing your problem? Please create a reproducable code example of your problem! Check the points under ['Help others reproduce the problem'](https://stackoverflow.com/help/how-to-ask) – 5th Jun 22 '18 at 08:06
  • As this is a contao problem everybody who works with contao 4.4 has this code :) This question is more about configuring/ handling code and knowing where to make adjustements – toruwe Jun 22 '18 at 08:09

1 Answers1

0

In your case you do not configure any DNS names for your website roots, since you are using only one domain. Instead, you should use the following in your app/config/config.yml:

contao:
    prepend_locale: true

Clear and warmup the production cache afterwards. This will generate URLs like example.com/de/… and example.com/en/….

See also https://github.com/contao/core-bundle#configuration

fritzmg
  • 2,494
  • 3
  • 21
  • 51