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)

Postgres on Neon - Get the Free Plan

No credit card required. The database you love, on a serverless platform designed to help you build faster.

Get Postgres on Neon

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay