Skip to content
Foldocs
On this pageURL structure
Internationalization

Locale routing

Understand locale prefixes, fallback pages, and canonical alternates.

URL structure

With i18n enabled, / redirects to the default locale landing page and docs are served under paths such as /en/docs and /es/docs. Page slugs remain identical across locales so switcher links can be generated deterministically.

Fallback routes

When a translation is missing, Foldocs loads the fallback locale's source into the requested route. Metadata records both the route locale and source locale, which keeps search filtering, navigation, Markdown URLs, and alternate links correct.

Right-to-left locales

Use dir: "rtl" for right-to-left locales. Sidebar indentation, menus, pager arrows, and layout borders use logical direction styles.

Last updated Aug 2, 2026