Multilingual site πŸ”—

In this tutorial, you will add a Bosnian translation to the site from the Quickstart.

Set the default language πŸ”—

Create _config.yaml in the site root:

lang: en

Files directly inside content/ now represent the English site.

Add the translated home page πŸ”—

Create content/bs/index.md:

---
title: Početna
description: Moja prva Flatmark stranica
---

# Zdravo, Flatmark!

Ova stranica je generisana iz Markdown dokumenta.

The site has this structure:

my-site/
β”œβ”€β”€ _config.yaml
└── content/
    β”œβ”€β”€ index.md
    └── bs/
        └── index.md

Preview both languages πŸ”—

Run:

flatmark serve

Open http://localhost:5555 for the English page and http://localhost:5555/bs/ for the Bosnian page. The default theme displays a language switcher linking the two versions.

Add matching pages πŸ”—

Create content/about.md:

# About

Then create its translation at content/bs/about.md:

# O nama

Open http://localhost:5555/about.html and use the language switcher. It links to /bs/about.html because Flatmark matches translations by their path relative to the default-language or language-code folder.

The completed structure matches the multilingual example.