Skip to main content
SolidBase
Beta

Internationalisation

SolidBase has built-in i18n support which can be configured in the root config:

export default defineConfig(
createWithSolidBase(theme)(
/* SolidStart options */
{
...
},
/* SolidBase options */
{
...
lang: "en", // default lang without route prefix
locales: {
fr: {
label: "Français",
themeConfig: {
...
},
},
},
...
}
)
);

When the language is switched, the path will have a locale prefixed applied. The following route structure is recommended:

.
└─ src
└─ routes
├─ fr
│ ├─ index.mdx
│ └─ about.mdx
├─ index.mdx
└─ about.mdx
Edit this page on GitHub

Last updated: 11/15/24, 4:16 AM

SolidBaseFully featured, fully customisable static site generation for SolidStart
Community
githubdiscord