aralroca / next-translate-plugin

Next-translate plugin for i18n in Next.js 🌍 - Load page translations and use them in an easy way!
MIT License
30 stars 17 forks source link

App Directory pages giving 404 #70

Closed alvesvin closed 1 year ago

alvesvin commented 1 year ago

What version of this package are you using?

next-translate@2.5.3 next-translate-plugin@2.5.3

What operating system, Node.js, and npm version?

Linux Node v20.5.1 Npm v9.8.0

What happened?

App Directory pages gives 404 when using next-translate-plugin in next.config.js

What did you expect to happen?

App Directory pages should load

Are you willing to submit a pull request to fix this bug?

No, sorry

https://codesandbox.io/p/sandbox/nifty-stallman-4y9z6y

alvesvin commented 1 year ago

In the provided sample the Pages Dir page /test works but /en or /pt-br pages on the App Dir errors on 404 if next.config.js includes next-translate-plugin. Am I missing something?

alvesvin commented 1 year ago

Okay, got it. It just doesn't work with dynamic /app/[lang]/... path. Language should be specified via searchParams lang.