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)

AWS Q Developer image

Build your favorite retro game with Amazon Q Developer CLI in the Challenge & win a T-shirt!

Feeling nostalgic? Build Games Challenge is your chance to recreate your favorite retro arcade style game using Amazon Q Developer’s agentic coding experience in the command line interface, Q Developer CLI.

Participate Now

👋 Kindness is contagious

Explore this insightful write-up, celebrated by our thriving DEV Community. Developers everywhere are invited to contribute and elevate our shared expertise.

A simple "thank you" can brighten someone’s day—leave your appreciation in the comments!

On DEV, knowledge-sharing fuels our progress and strengthens our community ties. Found this useful? A quick thank you to the author makes all the difference.

Okay