DEV Community

MokDevelopment
MokDevelopment

Posted on

i18Next's default locale and next build command

Hi there.

As i18Next has no native way to force the locale as a folder prefix we all use this "default" hack. By doing so "default" is redirected via middleware to "en" (if thats your default lang) to ensure the folder structure stays the same for all the languages.

Fair enough - feels a little bit hacky and not native - but why not - it does its job.

My problem is now that next build tries to create pages for "default" as well. How do I suppress this error creating step?

Image description

Thanks

Top comments (0)

Image of DataStax

AI Agents Made Easy with Langflow

Connect models, vector stores, memory and other AI building blocks with the click of a button to build and deploy AI-powered agents.

Get started for free