Multilingual Sites

In case your visitors are spread across different countries and you need to provide your content in several languages, Automad's built-in language routing lets you serve each visitor the content that matches their language. Follow the steps on this page to turn your site into a multilingual website.

The Site Structure

The first step is to organize your site structure. Each language gets its own landing page directly below the homepage, and all pages in that language live below it. This keeps the content of each language together and easy to manage.

Here’s how to set up the structure:

  1. Add a new page below the homepage for each language you want to support, for example English, Français and Deutsch. These pages serve as the landing pages of each language.
  2. Choose any title you like. The title doesn't affect the URLs, since you'll change the slugs in the next step.

Once you’ve created the pages, your homepage has one child page for each language.

Language Slugs

By default, Automad generates the slugs of your landing pages from their titles. For language routing to work, you have to change them to two-letter language codes such as en, fr or de.

Here’s how to change the slugs:

  1. Open the Settings tab of each landing page.
  2. In the Directory Name field, which holds the page’s slug, replace the generated slug with the matching language code, for example:
    1. English → en
    2. Français → fr
    3. Deutsch → de
  3. Make sure each landing page has its own unique language code.

These slugs tell Automad which pages represent which language. The language routing in the next step relies on them.

Routing Languages

Now that the landing pages and their slugs are in place, you can enable language routing. Automad then serves the content that matches the language code in the URL.

Here’s how to enable language routing:

  1. Open System Settings in the dashboard.
  2. Go to the Internationalization section.
  3. Enable Language routing.

From now on, every URL starts with a language code. A visitor who opens /fr or any page below it gets the French content. Visitors who open the homepage / are redirected to the landing page of their language.

Automad picks the language in the following order:

  1. The language code in the URL, e.g. fr in /fr/about.
  2. The preferred language of the visitor's browser, if it is available on your site.
  3. The first language page in the page order, as described above.

The detected language is remembered for the rest of the visit, so going back to the homepage keeps the visitor in the same language. Note that the Page Language field in the page settings is hidden while language routing is enabled, since the language is taken from the URL instead.

Translating Your Content

At this point, the multilingual structure is set up, but it’s still empty. Next, add the translated content below each landing page.

Once you’ve added your content, test your multilingual site. Make sure to check that:

  • each landing page loads correctly at its URL, e.g. /en, /fr and /de,
  • the content is displayed correctly in each language and there are no broken links,
  • navigation and links between languages work as expected.

Linking To Languages

Your multilingual site is now ready for visitors, but they still need a way to switch to another language. With language routing enabled, pages of other languages don't show up in the navigation or in the site search.

To link to another language, create a page inside the current language that redirects to the landing page of the other language. Using the languages from this guide, you can add a link to the German version on all English pages as follows:

  1. Create a new page below the English landing page, e.g. /en/german.
  2. In its Settings tab, enter /de in the Redirect page to another URL field.
  3. In case you use the Standard Lite theme, select Show in primary footer section in the Show Page In Footer field in order to link the page in the footer.

Repeat these steps for every other combination, such as a link to the French version on the English pages or a link to the English version on the German pages.

Open Graph & Favicons Scripts & Integrations