Skip to content
Type something to search...
Lumio Theme Documentation

Multilingual URL Behavior

Lumio’s multilingual system is easy to misread because there are three different layers involved:

  1. src/config/language.json
  2. settings.multilingual in config.toml
  3. helper logic in src/lib/utils/i18nUtils.ts

Language Definitions

The available languages come from:

[
{
"languageName": "En",
"languageCode": "en",
"contentDir": "english",
"weight": 1
},
{
"languageName": "Fr",
"languageCode": "fr",
"contentDir": "french",
"weight": 2
}
]

Main Multilingual Settings

In src/config/config.toml:

[settings.multilingual]
enable = true
defaultLanguage = "en"
disableLanguages = []
showDefaultLangInUrl = false

WhatshowDefaultLangInUrl = falseMeans

This is the setting that confuses most people.

When it is false:

  • English pages use URLs like /about/
  • French pages use URLs like /fr/about/

When it is true:

  • English pages use /en/about/
  • French pages use /fr/about/

How Static Paths Are Generated

Lumio uses helper functions like generatePaths() and supportedLanguages from i18nUtils.ts.

Those helpers decide whether the language param becomes:

  • undefined for the default language
  • or an explicit code such as fr

based on showDefaultLangInUrl.

Localized URLs In Components

Links are usually generated with:

getLocaleUrlCTM("/contact/", Astro.currentLocale)

That helper also:

  • keeps external links untouched
  • handles mailto: and tel:
  • strips .md/.mdx endings
  • applies trailing slash behavior

Practical Editing Advice

If links look wrong after enabling or disabling multilingual mode:

  1. check language.json
  2. check settings.multilingual in config.toml
  3. restart dev so config-derived logic fully refreshes
  4. make sure your content exists in the expected language folders