Open setowilliam opened 10 months ago
Good catch, we'll probably need to introduce a new basePath
option to createI18nMiddleware
. In the meantime, you could use the default urlMappingStrategy
. Not ideal but I'll try to fix this bug asap.
@QuiiBz I came across the same Issue. I believe this library is one of the few libraries that meet the need for the Next.js app router users to "do not want to change the url structure by introducing i18n feature into our app". So I hope this Issue will be fixed as soon as possible.
Describe the bug When using the
next-app
example, usingbasePath
withurlMappingStrategy: "rewrite"
redirects tonot-found
page when navigating tohttp://localhost:3000/base
.To Reproduce Steps to reproduce the behavior:
basePath
inlocales/client.ts
to/base
basePath
innext.config.js
to/base
urlMappingStrategy
inmiddleware.ts
torewrite
http://localhost:3000/base
not-found
screen is shownExpected behavior From the description of
rewrite
:I would expect that navigating to
http://localhost:3000/base
would rewrite tohttp://localhost:3000/base/en
.Screenshots![Screenshot 2023-10-16 at 11 37 20](https://github.com/QuiiBz/next-international/assets/28901927/5dc98c7e-25ad-4278-8cbd-0199bc8692f9)
About (please complete the following information):
1.1.3
13.5.4