Internationalization (i18n) in Thulite is powered by Hugo’s multilingual mode.

Looking for an example?

Quick setup

  1. Enable multilingual mode in your Doks config.
  2. Define the default language and each supported language in your config.
  3. Create language-specific content folders and matching translated pages.
  4. Add translated UI strings and per-language menus if needed.

Enable multilingual mode

In config/_default/params.toml, turn on the Doks multilingual settings:

params.toml
[doks]
  multilingualMode = true
  showMissingLanguages = true

Then configure the default language in config/_default/hugo.toml:

hugo.toml
defaultContentLanguage = "en"
disableLanguages = []
defaultContentLanguageInSubdir = false

Configure languages

In config/_default/languages.toml, add one block per language:

languages.toml
[en]
  contentDir = "content/en"
  languageCode = "en-US"
  languageName = "English"
  weight = 10

[de]
  contentDir = "content/de"
  languageCode = "de-DE"
  languageName = "Deutsch"
  weight = 20

[nl]
  contentDir = "content/nl"
  languageCode = "nl-NL"
  languageName = "Nederlands"
  weight = 30

contentDir tells Hugo where to look for that language’s pages. This is the key setting for keeping each language isolated.

Use language-specific content directories

Keep the same relative path for each translation:

  • English: content/en/docs/getting-started.md
  • German: content/de/docs/getting-started.md
  • Dutch: content/nl/docs/getting-started.md

This keeps URLs and page structure aligned across translations.

Mount content by language

If you use separate content folders with Doks, mount each folder into Hugo’s content tree:

module.toml
[[mounts]]
  source = "content/en"
  target = "content"
  lang = "en"

[[mounts]]
  source = "content/de"
  target = "content"
  lang = "de"

[[mounts]]
  source = "content/nl"
  target = "content"
  lang = "nl"

This is especially useful when you want each language to share the same site structure while keeping content separate.

Translate interface strings

Store shared UI translations in i18n files, such as:

  • i18n/en.toml
  • i18n/de.toml
  • i18n/nl.toml

Example:

[read_more]
other = "Read more"

Use Hugo’s i18n function in templates to render the correct language string.

Optional: fill missing translations

If one language is incomplete, you can reuse content from the default language:

module.toml
[[mounts]]
  source = "content/en"
  target = "content"
  lang = "de"

This lets a translated site fall back to the default language for pages that are not yet available.

Per-language menus

If your site has different navigation, create menu files like:

  • config/_default/menus/menus.en.toml
  • config/_default/menus/menus.de.toml
  • config/_default/menus/menus.nl.toml

This keeps menu labels and links aligned with each language.

Learn more

Hugo
Multilingual mode

Official Hugo guide to configure and manage multilingual sites.