Next.js Discord

Discord Forum

multilingual next.js application

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Avatar
Spectacled bearOP
I can't configure a multilingual application (it - en) in next.js 14.2. Any one can help me?
This is my structure folders
Image

7 Replies

Avatar
@Spectacled bear I can't configure a multilingual application (it - en) in next.js 14.2. Any one can help me? This is my structure folders
Avatar
wrap you whole stuff inside a [locale] folder. Like that you can access the locale everywhere inside your routes.

The whole process is described here: https://nextjs.org/docs/app/building-your-application/routing/internationalization#localization
Avatar
Spectacled bearOP
I have tried following this documentation, but it does not work for me or I am doing something wrong..can you help me in DM?
Avatar
@Spectacled bear I have tried following this documentation, but it does not work for me or I am doing something wrong..can you help me in DM?
Avatar
others might profit from the answer as well. So stay with us inside this thread. Please provide more information where you are stuck and where you have issues
Avatar
@B33fb0n3 others might profit from the answer as well. So stay with us inside this thread. Please provide more information where you are stuck and where you have issues
Avatar
Spectacled bearOP
I'm started from this template: https://github.com/9d8dev/next-wp... my prohect make graphql query to wp headless to retrieve page/post/custom post type. All work so far.
Now i add POLYLANG to wordpress to handle translations from backend, and i need to reflect that multilingual situation in next.js....but I can't understand how to do that.
Avatar
Spectacled bearOP
I share my project: https://github.com/giuliozulian/gpblex (readme is incomplete)
Avatar
@Spectacled bear I share my project: https://github.com/giuliozulian/gpblex (readme is incomplete)
Avatar
after taking a look at your project, it doesn't seem like you included a folder with [locate]. Also there are missing fundamentals of internationalization like middleware, dictionaries, ...

https://nextjs.org/docs/app/building-your-application/routing/internationalization#localization
Avatar
@Spectacled bear did you added the [locate] folder now to your project?